Turinys
"Fatališka klaida: Viršytas maksimalus vykdymo laikas" rodo, kad jūsų svetainės scenarijus buvo vykdomas ilgiau nei nustatytas laikas, todėl procesas buvo nutrauktas. Taip gali nutikti dėl daug išteklių reikalaujančių įskiepių, temų arba pasirinktinių scenarijų. Štai kaip ištaisyti šią klaidą padidinant maksimalų vykdymo laiką: [...]
Redaguokite .htaccess failą
Svetainė .htaccess
file, located in the root directory of your WordPress installation, can be used to increase the PHP maximum execution time. Here’s how:
- Connect to Your Site via FTP or File Manager: Naudokite FTP klientą arba prieglobos valdymo skydelyje pateiktą failų tvarkyklę.
- Locate and Edit the .htaccess File: Find the
.htaccess
file in the root directory. If you can’t see it, make sure to enable the option to show hidden files in your FTP client or file manager. - Modify the .htaccess File: Add the following line at the bottom of the file:
php_value max_execution_time 300
This sets the maximum execution time to 300 seconds (5 minutes). You can adjust the number as needed.
- Išsaugoti pakeitimus: Upload the modified
.htaccess
file back to the server if you’re using FTP.
Redaguoti wp-config.php failą
Another method is to increase the execution time by editing the wp-config.php
failą, kuris taip pat yra jūsų "WordPress" diegimo šakniniame kataloge.
- Redaguoti wp-config.php failą: Open the file and add the following line of code just before the line that says “That’s all, stop editing! Happy blogging”:
set_time_limit(300);
This will also increase the maximum execution time to 300 seconds.
Edit the php.ini File
If you have access to the php.ini
file on your server, you can directly increase the maximum execution time. This file is typically not accessible on shared hosting.
- Locate and Edit the php.ini File: If you’re on a VPS or dedicated server, find the
php.ini
file (the location can vary). For shared hosting, you might be able to create a file namedphp.ini
šakniniame "WordPress" diegimo kataloge. - Modify the File: Add or modify the following line:
max_execution_time = 300
Use a Plugin
Some WordPress plugins allow you to manage PHP settings, including the maximum execution time, directly from the WordPress admin dashboard. This can be a convenient option if you’re not comfortable editing files directly.
- Install a Plugin: Look for a plugin that allows PHP configuration changes, such as WP Maximum Execution Time Exceeded or WP Config File Editor.
- Adjust the Setting: Follow the plugin’s instructions to increase the maximum execution time.
Susisiekite su prieglobos paslaugų teikėju
If you’re uncomfortable making these changes yourself, or if you’ve tried without success, contact your hosting provider. Some hosting environments restrict these changes, and your provider may need to adjust the execution time for you.
Išvada
Increasing the maximum execution time can help resolve the “Fatal Error: Maximum Execution Time Exceeded” error in WordPress. However, it’s also important to investigate the underlying cause, such as a plugin or theme requiring excessive resources, to prevent future occurrences. Regularly maintaining your site, updating WordPress core, plugins, and themes, and using quality hosting can also help avoid such errors.