WordPress – Update issues
Updating WordPress is usually pretty seamless, and a welcome relief compared to the difficulties faced updating more troublesome CMS’s such as Magento. In fact I can only remember one incident in my career where an update failed and corrupted the database. That issue was due to very poor hosting, that went down before the update was able to complete.
That was before this week, when a new client’s WordPress website failed to update to v4.3.1. The update to WP 4.3.1 failed after the ‘Unpacking the update’ message below ran for 40 minutes, when it normally completes in under a minute.
Unpacking the update
Plugin updates were also incredibly slow. This can be a concern as incomplete updates can cause unexpected code issues in the future.
Fixing WordPress Update Time out Issues
Hosting is always the first place to look when you experience time out and unresponsive update issues. If you are new to web design, I’d recommend contacting your hosting comapny for help, or looking through your hosting control panel to see if you can find your memory settings. Basic hosting will often be quite locked down and won’t give you access to several configuration files.
Testing your site’s memory limit
If you have the security and cache plugin, Wordfence installed, it gives you the option to Test your WordPress host’s available memory.
This test will create a data structure that contains approximately 80 megabytes of memory to test if your web server allows you to allocate at least that much memory. We consider this the absolute minimum for Wordfence operation. If this test fails you should contact your hosting provider and ask them to allocate more memory to your WordPress server.
WooCommerce will also warn you if you have too low a memory setting, to run the ecommerce plugin.
Increasing memory allocated to PHP
Within WordPress
By default WordPress will try to allocate 40MB to PHP, however some hosts may restrict this further. To try and increase the memory allocated to PHP, add the following code to your wp-config.php file;
//increase php memory limit for WP define( 'WP_MEMORY_LIMIT', '96M' ); //just for the admin area define( 'WP_MAX_MEMORY_LIMIT', '256M' );
This needs to go just above the wp-settings.php include.
require_once(ABSPATH . 'wp-settings.php');
max_execution_time is also often limited and can similarly be causing the time out.
Within PHP.ini
If you have access to your PHP.ini configuration file, you can try to increase your max_execution_time and memory_limit values.
max_execution_time = 256M memory_limit = 64M
Within .htaccess
php_value memory_limit 256M php_value max_execution_time 18000
Some of these setting may be restricted by your host, although I’ve found the WP_MEMORY_LIMIT setting very effective. I hope this helps with your WordPress update issues.
One Comment