Search results

When Your WordPress Upgrade Fails

by Tom Johnson on Dec 26, 2010
categories: technical-writing

To keep your WordPress blog secure and up-to-date, you want to apply the latest updates. When there's an update available, you see it at the top of your Dashboard area. To upgrade WordPress:

1. First back up your files. You should already have an automated backup strategy in place. Two backup plugins I like to use are WP-dbmanager and WordPress Database Backup. To install one of these plugins, to go Plugins > Add New, search for it, and then install, activate, and run it.

This backs up your database (which includes your posts, pages, comments, and settings). If you want to back up your theme as well, back up the folder under wp-content/themes.

2. After you back up your files,  upgrade WordPress by going to Tools > Upgrade. Click Upgrade Automatically.

If you receive an error trying to upgrade, you can deactivate all your plugins to free up more memory, and then run the upgrade. It should work. Then reactivate your recently active plugins.

However, you can get around this problem in a more permanent way by increasing the memory in your php.ini file. The php.ini file includes settings for how php scripts run on your site. Increasing the memory settings in your php.ini file may also allow your plugins to run without error as well (for example, the Section Widget plugin required a lot of memory from my site and would corrupt the display on the Widgets page until I increased the memory limit in the php.ini file).

If you have cPanel on your web host, you can increase the memory of your php.ini file by doing the following:

  1. Under Software / Services, click PHP Config.
  2. Click the Install PHP.INI Master File button. This adds a default php.ini.default file in your public_html folder.
  3. Select the PHP 5 (Single php.ini) button at the top. This makes is so all your directories use the same php.ini file.
  4. Download the php.default.ini file and rename it to php.ini.
  5. In the file, change the following values to something like the numbers below:
max_execution_time = 45     ; Maximum execution time of each script, in seconds
max_input_time = 120; Maximum amount of time each script may spend parsing request data
memory_limit = 64M      ; Maximum amount of memory a script may consume (32MB)
  • max_execution_time = 45
  • max_input_time = 120
  • memory_limit = 64M

While you're in there, also increase your upload_max_filesize number a bit (for example, to 25). This will allow you to upload an exported WordPress XML file (as well as larger images and other files) if you ever need to.

Now run the upgrade script again. It should work. If not, contact your web host to see if you have it installed and configured the php.ini file correctly.

About Tom Johnson

Tom Johnson

I'm an API technical writer based in the Seattle area. On this blog, I write about topics related to technical writing and communication — such as software documentation, API documentation, AI, information architecture, content strategy, writing processes, plain language, tech comm careers, and more. Check out my API documentation course if you're looking for more info about documenting APIs. Or see my posts on AI and AI course section for more on the latest in AI and tech comm.

If you're a technical writer and want to keep on top of the latest trends in the tech comm, be sure to subscribe to email updates below. You can also learn more about me or contact me. Finally, note that the opinions I express on my blog are my own points of view, not that of my employer.