Aaronn
Posted on April 8, 2024
Having trouble with WordPress updates timing out? It's a common issue, but fret not! Here's a handy guide to help you troubleshoot and resolve those pesky timeouts. From tweaking PHP and HTTP server timeouts to managing plugins and memory limits, these steps are designed to tackle the problem head-on. Whether it's utilizing browser-based updaters or going the manual route via FTP/SFTP, there's a solution for every scenario. Check out these practical strategies to keep your WordPress site up-to-date and running smoothly. Let's dive in and get those updates back on track!
Increase PHP Timeout
Locate the php.ini file on your server (sometimes in the WordPress root directory).
Search for the max_execution_time setting and increase the value to something higher than the default (e.g., 300 for 5 minutes).
Save the changes and try updating WordPress again.
Increase HTTP Server Timeout
For Apache, edit the .htaccess file in your WordPress root directory and add:
php_value max_execution_time 300
For Nginx, edit the server block configuration file and add:
location ~ \.php$ {
fastcgi_read_timeout 300;
}
Disable Plugins
Deactivate all plugins before attempting the update as a plugin conflict could be causing the timeout.
If the update is successful with plugins disabled, re-enable them one by one to identify the problematic plugin.
Increase WordPress Memory Limit
Edit the wp-config.php file and add the following line at the end:
define('WP_MAX_MEMORY_LIMIT', '256M');
This increases the maximum memory limit for WordPress, which may help with larger updates.
Use Browser-Based Updater
If the updates fail through the WordPress admin dashboard, try the browser-based updater by visiting yourdomain.com/wp-admin/update-core.php
Update via FTP/SFTP
Download the latest WordPress version from the official website.
Unzip the downloaded file and upload the new files via FTP/SFTP to your server, overwriting the existing WordPress files (backup first).
Log into your WordPress admin dashboard and follow the prompts to complete the update.
Update Manually via WP-CLI
If you have command-line access, you can use WP-CLI to update WordPress with the command:
wp core update
Increase PHP Process Limits
If you're on a shared hosting environment, your host may have set low process limits. Contact your host to increase the limits.
Check Error Logs
Review your server's error logs (e.g., /var/log/apache2/error.log or /var/log/nginx/error.log) for any clues about what's causing the timeout.
If none of these steps work, it's possible that there's a server configuration issue or a conflict that may require further investigation or assistance from your hosting provider.
Posted on April 8, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.