Technoracle
    Facebook Twitter Instagram
    Facebook Twitter Instagram
    TechnoracleTechnoracle
    • Home
    • AWS
      • EC2
      • Lightsail
      • RDS
      • S3
    • Ubuntu
      • Ubuntu 20.04
      • Ubuntu 22.04
    • AI Tools
    • Web Hosting
    • WordPress
    • Tech News
    Technoracle
    Home - How to Increase Execution Time in PHP
    Uncategorized

    How to Increase Execution Time in PHP

    Sulagna MukherjeeBy Sulagna MukherjeeOctober 2, 2022No Comments2 Mins Read
    increase execution time in PHP

    By default, PHP is allowed to execute under 30 sec in most of the web servers, but it varies. When it reaches the limit, it returns a fatal error “Maximum execution time of 30 seconds exceeded”. Sometimes users may need to upload big chunks of files, or need to send mass emails, wordpress theme uploads, etc. In all cases, the most common error is PHP maximum execution limit crossed. In this tutorial, I am going to share how to increase execution time in PHP. So, let’s get started.

    Page Contents

    • How to Increase Execution Time in PHP
      • Change PHP max_execution_time in cPanel
      • Increase max_execution_time through SSH
    • Conclusion

    How to Increase Execution Time in PHP

    I will share how to fix the PHP maximum_execution_time exceeded issue from cPanel as well as from the command line of any VPS or cloud server.

    Change PHP max_execution_time in cPanel

    To change the maximum execution time limit in cPanel, first go to MultiPHP INI editor under software.

    Multi PHP INI editor in cPanel

    Choose the location where you want to increase the value of maximum execution time.

    choose PHP INI file to edit

    When you selected the location, where the value needs to be updated. A new window will open, now find the max_execution_time and other php directives you want to update the value.

    Now, you can change the PHP maximum execution time value as required. Alternatively, you can update the .htaccess file to increase execution time in PHP.

    To update the php execution time by editing .htaccess, open the htaccess file in cpanel or download the file using FTP. Add the following line at the bottom.

    php_value max_execution_time 300

    Increase max_execution_time through SSH

    If you are using any cloud or VPS hosting, You might have SSH access to the server. In my case, I am using the Ubuntu web server on AWS Lightsail. To update the maximum execution time first, you need to find the PHP INI file on the server. Now edit the PHP INI file using any text editor to change the execution time value.

    $ sudo vi /etc/php/7.4/apache2/php.ini

    After opening the php ini file, search for max_execution_time and edit the corresponding value.

    PHP INI edit via SSH

    Conclusion

    In this tutorial, you have learned how to increase execution time in PHP. If you have any doubts feel free to contact me, I will definitely try to help you. Also, you can join our elite Facebook group to get direct help from me. If you like this tutorial, please share this article on your social media handle.

    cpanel tips max_execution_time increase ubuntu tips
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit
    Previous ArticleTop 5 eLearning Platforms in 2022 [Completely Free]
    Next Article Top 5 Sticky Note Applications for Ubuntu 22.04
    Sulagna Mukherjee

    Sulagna is a tech enthusiastic girl, she is exploring the different fields of technology and sharing her learning through her writings with everyone . You can follow her at YouTube(Noobie Techs)

    Related Posts

    Enable PHP BCMath Extension in cPanel
    cPanel

    How to Enable PHP BCMath Extension in cPanel (3 Easy Quick Steps)

    Read More
    Install PHP on Ubuntu 22.04
    Ubuntu

    How to Install PHP on Ubuntu 22.04 [Simple Guide]

    Read More
    Enable PHP Zip Extension
    cPanel

    How to Enable PHP Zip Extension in cPanel (3 Easy Steps)

    Read More
    Add A Comment

    Leave A Reply Cancel Reply

    Install Google Chrome on Ubuntu 22.04

    How to Install Google Chrome on Ubuntu 22.04(Easy Guide)

    August 29, 2023
    Enable PHP BCMath Extension in cPanel

    How to Enable PHP BCMath Extension in cPanel (3 Easy Quick Steps)

    August 25, 2023
    install PHP GD on Ubuntu

    How to Install PHP GD on Ubuntu 22.04 [Easy Guide]

    May 2, 2023
    Install PHP on Ubuntu 22.04

    How to Install PHP on Ubuntu 22.04 [Simple Guide]

    April 26, 2023

    Subscribe to Blog

    Enter your email address to subscribe to
    this blog and receive notifications of new posts by email.

    Facebook Twitter Instagram Pinterest
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    © 2023 Technoracle

    Type above and press Enter to search. Press Esc to cancel.

    Click to Copy
    Go to mobile version