Errors Updating WordPress

It seems that many people out there are having problems automatically updating WordPress and they are getting the following error:

Could not copy file.: /public_html/x/wp-admin/css/theme-editor.dev.css

After trying several (probably all) of the suggestions for automatically upgrading from the WordPress Support Forums, I eventually had to resort to a manual upgrade – documented at Updating WordPress « WordPress Codex.

As my host runs CPanel, I changed the way I did the upgrade slightly, so just in case there are others out there with the same predicament, here are the steps I followed:

Before we start, read the Instructions on “Take a Backup” in the updating WordPress link above. If your upgrade goes wrong and you haven’t taken any backups, then the liability is all yours 🙂

  1. Download the upgrade file from WordPress (v3.0.1 file is here – http://wordpress.org/wordpress-3.0.1.zip)
  2. Open up the File Manager under CPanel and navigate to your WordPress folder (e.g. /public_html/mywebsite)
  3. Rename the wp_includes and wp_admin folders (e.g. to wp_includes-old, wp_admin-old)
  4. Navigate to the wp-content/upgrade folder
  5. Delete any folders here (there may be a remnant of the failed automatic upgrade called wordpress3-tmp or similar)
  6. Upload the file you just downloaded in step 1 (e.g. wordpress-3.0.1.zip)
  7. Right-click the file under CPanel’s File Manager and choose the option to Extract
  8. The Extract will have created a folder called “wordpress” – Navigate to this folder
  9. Now Select all the files (hint – in CPanel’s File Manager, there is a button called “Select All”)
  10. Copy (right-click and select Copy) the files to your WordPress folder (e.g. /public_html/mywebsite)
  11. Navigate to your WordPress folder (e.g. /public_html/mywebsite) – If you have a file called .maintenance, then delete it
  12. Login to your WordPress site’s Admin panel – if the upgrade has worked, then you will have a message that your WordPress has been upgraded and your database now needs to be upgraded – click the button and wait for WordPress to upgrade your database
  13. Check out your upgraded WordPress blog and make sure it’s all working
  14. When you’re happy it’s all working, delete the wp_includes_old and wp_admin_old folders
  15. As an additional step, you might want to delete the contents of the upgrade folder

Voila! The work is done. And with any luck, next time you upgrade, you’ll be able to upgrade WordPress automatically.

If you have this problem and you need to manually upgrade, then Good Luck!

2 Comments:

  1. There’s a patch (http://core.trac.wordpress.org/ticket/10913) for WordPress that should go into 3.2 and help fix this upgrade error for most people running into it. It only seems to happen with servers running Pure-FTPd (and usually cPanel). In the meantime, there’s a plugin that should help fix updates for most people: http://wordpress.org/extend/plugins/ftp-upgrade-fix/

  2. John, Thanks for the explanation. My FTP problems have now gone away, and this coincided with my hosting provider changing something in the FTP side of things. Hopefully anyone else with this problem will get some relief from the plugin you’ve mentioned – http://wordpress.org/extend/plugins/ftp-upgrade-fix/.

Comments are closed