Xampp Maximum PHP Execution Time Exceeded

Configurare noua (How To)

Situatie

This is probably the most common issue first-time XAMPP users encounter. Try to install a large plugin or update the WordPress core and you’re almost guaranteed to see a fatal error message letting you know that the Maximum execution time of 30 seconds was exceeded.

Solutie

The good news is, this is a really simple problem to fix.

What’s going on is that the settings controlling the version of PHP running on your XAMPP installation are limiting script execution time to 30 seconds. However, it takes longer than 30 seconds to install large plugins, update the WordPress core or perform many other common WordPress operations.

To fix the issue, you need to adjust a single PHP setting in your XAMPP installation’s php.ini file.

There are two ways to get to this file.

  1. Open up XAMPP control panel, click on Config in the Apache row, and select PHP (php.ini). This will open the file in a text editor, but probably not your preferred text editor.
  2. Navigate to your root XAMPP folder, open the php directory and look for the file titled php.ini. Then open that file with your preferred text editor.

On my Windows laptop with XAMPP installed directly into the C: directory, the file is located at this address: C:\xampp\php\php.ini.

Open php.ini in a text editor and find the line max_execution_time. If you’re running the latest version of XAMPP, it should appear on line 368 of the file. To increase the execution time, just input a larger number. The default value is 30 seconds, but many shared hosting environments set this limit at 120 seconds. Increasing this value to 120 should keep you from ever running into this particular issue again while working with WordPress websites.

Anytime you make a change to php.ini you must save the file, close it, and then stop and restart Apache in the XAMPP control panel. Apache only reads the values in php.ini when it starts up. So any changes made to php.ini while Apache is already running won’t take effect until Apache restarts and reads the new values. Restart Apache and then reattempt the operation that caused the error to appear. You should now see things proceed as expected.

Tip solutie

Permanent

Voteaza

(10 din 26 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?