Quantcast

Upgrade Tips for WordPress

January 25th, 2007

Update – 2020: This is obviously an outdated post, but I’m leaving it here for archive purposes.  This site is currently running the latest WordPress Build.   With the fantastic new tools and block editors that WordPress includes in the platform, upgrading should be fairly simple for most users.  Nearly all web hosts now use managed WordPress hosting options, or Fantastico / Softaculous install software for installation, and they work fine as well.  Best regards with your journey!

 *****

  I finished a manual upgrade from WordPress last night.  Wahoo!  Not too complex, but took longer than I thought.  Fortunately now WordPress offers automatic upgrades within the site itself, which simplifies things immensely- for most people that is the place to start.  However, this post was written orginally when it required manually updating- and it’s not too difficult honestly.  However, sometimes Plugins or other files can cause a broken site or pages/categories. Consider deactivating your plugins first if you think your site is broken- you can reactivate them one at a time and see how it does.

For manual updates, your favorite FTP utility will be essential.  I previously used FireFTP within Firefox (it no longer works with Firefox / Mozilla as of 2018).  There are many other simple FTP programs to choose from. Now about the WordPress upgrade…. with all due respect to those of you reading, I try to remember this quote by Douglas Adams (1952-2001):

“A common mistake that people make when trying to design something completely foolproof, is to underestimate the ingenuity of complete fools.”  

That seems more appropriate with the passing of time!  So here’s how I completed the upgrade.  If anyone has other useful information, please comment:

Remember: If you are using an older version of WordPress,  you may require staged upgrading to later versions before upgrading all at once.   That being said… you may need to consider a rebuild or “clean installation” of your WordPress site-  there are many relevant sites out there discussing this issue- take a look at where you are before you start, and consider that option.

If you are willing however, think about your upgrade stages – and consult the WordPress Codex for the latest support and Upgrade recommendations.

  1. First- read, heed and become very familiar with WordPress Upgrade instructions. WordPress is the authority and reference for how to upgrade- so go there first!  The following information is simply a guide for how I completed my upgrade, in case it might be helpful.
  2. Plan for at least a couple hours (or more) of time in case something doesn’t upload correctly or you forget where you were in the upgrade process… if you have to leave and come back eight hours later, you may not remember something, and your site could be hard down and require starting over.
  3. Complete all database backups as indicated, both within WordPress and phpMyAdmin. I like to save the backup files both to the web server and my local computer. WordPress has excellent database backup instructions here: WordPress Backups.
  4. Make a copy of the .htaccess file and the wp-config.php file in case they are accidently deleted. I also like to save a copy of my WordPress wp-content folder in case I accidently delete or overwrite those files.
  5. Do you have backups of all images and other customized content that you have uploaded to the webserver? Do that if you have not done previously.
  6. After downloading and extracting the file to my computer, I set up Windows Explorer to show the file tree of the new files and the file tree of the files on my blog (using cPanel File Manager) to see what was different.  I familiarized myself with the folders and files I would be adding to the webserver. WordPress recommends deleting webserver files first to ensure a clean install/upgrade. However I chose to overwrite the files as I went along, paying attention to exactly which files would be changed.  I am not familiar enough with every file used on my web server to simply delete them all.  Some of those files are used by other components, functions or plugins, and I wanted to ensure I kept them there.  Your choice.
  7. I have a duplicate functional localhost site of my blog (using Windows WAMPSERVER) which helps in two ways:
    • First, it allows me to test and verify that certain components, plugins and upgrades will work on my blog.
    • Second, I can then reference exactly what files are used while I upgrade via FTP to my live hosted blog. So after first completing the upgrade/install on my localhost site to verify compatibility with my theme, plugins, etc. I was confident to upgrade my live hosted site.
  8. I read the WordPress Upgrade  instructions a couple more times… “measure twice, cut once!”  Now I started the FTP program and went to work.
  9. In my FTP program, I expanded the file tree of the newly extracted WordPress files, and once step at a time verified exactly which files and folders would be transferred to the webserver. Ensure that you don’t simply tell FTP to transfer folders without verifying what files are in them!  After you’ve done this a few times it will be easier, but you don’t want to overwrite (or delete) your wp-content folder on the webserver!
  10. I uploaded the main/root WordPress files to my webserver root.  Follow the WordPress Upgrade instructions if your blog is not in your root directory.
  11. I uploaded all the wp-admin folders and files, then all the wp-includes folders and files.  Some of you may have other files or customizations here, but I knew I didn’t and simply replaced them.
  12. Then I started on the wp-content folder files:
    • In the wp-content plugins folder, I only uploaded the new Akismet and “hello” plugin files to my plugin folder.  I have other plugins in the folder that I wanted to save.
    • I then uploaded the new Classic and Default themes in the wp-content folder (making sure I left my own themes and files in the wp-content folder on the webserver!). If you are using the Classic and Default themes, you should know if you customized any pages or templates, and uploaded images- these “customizations” should be known by you, and the images saved as well in case you overwrite or delete them.  I don’t use the Classic or Default themes, so I simply replaced those folders with the new WordPress Classic and Default folders.
  13. That should be it!  Uploading everything took about an hour because I went slowly.  Now you simply add “/wp-admin/upgrade.php” to your site URL in your browser, (e.g. https://www.yourdomain.com/wp-admin/upgrade.php or https://www.yourdomain.com/wordpress/wp-admin/upgrade.php if WordPress is not in your root directory) hit enter and follow the simple instructions.  Remember to restart your plugins one by one and see how the site runs.
  14. Any Problems?  Lets hope not- Here are more detailed WordPress Extended Upgrade Installation instructions and Troubleshooting instructions to figure out any potential problems.
  15. One of the problems I did have on my localhost upgrade was that after everything was up and running, I went to update my permalink customization in the WordPress admin site.  Guess what?  I got a 500 server error… and then couldn’t go back or restart the site at all.  I was bummed but checked my log files.  I found in my Apache log file a list of errors with one commonality:
    • “.htaccess: RewriteRule: bad flag delimiters, referer: https://……./wp-admin/options-permalink.php”
  16. After a Google search, I learned there could be code errors, spaces, etc. in my .htaccess file.  So not having any php coding skills, I took a clean, basic .htaccess file with only “RewriteEngine on” and replaced that with the one in my root directory that wasn’t working.  And voila! Success!  WordPress modified the .htaccess as it needed.
  17. Some of you have many different .htaccess configurations, and that is why it is recommended to back it up before starting the upgrade.  My original .htaccess file had a php test configuration added to it, and that appears to have been the problem.
  18. I did not have any file permissions issues after the upgrade. I have seen this happen with other files I have added to my webserver, so that is one area to look at if you do have problems.  You can adjust file permissions via FTP or through the cPanel File Server program as necessary.

Hope your upgrade goes smoothly… remember not to underestimate the process!  Again, with all due respect to those of you who have read this far…. Douglas Adams also said:

“The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair!”

We should probably remember to think of this process as something that “might go wrong”…   But hey, you’ve got to love WordPress…

Thanks to the WordPress team!

3 Responses to “Upgrade Tips for WordPress”

  1. Hi,

    I hope you see this comment. I know this is an old post.

    I have just begun with WordPress and am developing a site on my local machine using a Wamp server (the same as you). I have done nothing yet except set a custom permalink rule and set the title etc. I want to upgrade the WP version from 2.3.1 to 2.3.2, but I wanted to do it on my local copy first to get used to doing that. I wanted to be clear about one thing though.

    Do I upgrade on the local copy first and run the upgrade script on that copy, then do a separate upgrade on the live site and run the script on that site separately? Do you know what I mean?

    At first I thought I was going to upgrade the site locally and run the script locally, then delete the live folders and ftp the local copy over, then restore the database on the live site with my local version. I didn’t realize I could do a separate upgrade on the local and then the live sites, but I guess that’s what you are saying that you do. The things is, and this is important, I want to be able to develop the site quite extensively on the local copy, then upload that to the live site when I am done. If I upgrade separately, will there be any problems updating the live site with the local copy?

    Have I got that right? I sure would appreciate knowing. It’s hard to find info on that.

    Thanks so much,
    John

  2. Hi John- Didn’t expect a comment on this old post! WordPress makes it easy to see them, huh? I will be honest- I am no expert when it comes to WordPress. I have done exactly what you describe in terms of managing a local site, then the live site, as separate installs/upgrades. However, my host uses “Fantastico” for an automated install/upgrade script that seems to work pretty well and I’ve defaulted to that when desired. Realistically, I have not upgraded in several versions as I began suffering from “upgrade fatigue”! Obviously you can manually upgrade your live site as well as using automated scripts. I do understand what you are asking- and if your goal is to constantly mirror your local to the live site, you should be able to do that… but it’s not my style or experience. I only use the local to experiment with. I would recommend searching around a little more for someone that does what you are asking as it sounds like a nice idea. Wish I could be of more help! Best regards-

  3. Hi Beau,

    I really appreciate your reply. And it has made the issue a little clearer for me. I will use the local site primarily to get it developed to a point where I can go “live” with some substantial content, and a presentation that I am happy with, instead of developing it live. From that point on, I will likely be using it for testing as you do.

    I installed the live site using Fantastico also. The problem I see with Fantastico for upgrades is that it has been several weeks now since WordPress released their urgent security upgrade, and Fantastico has not yet updated their version, so a person can’t upgrade through them yet. It seems like manual upgrades are at least more timely and perhaps more reliable once I learn how.

    I’ll do a bit more digging, but you have helped me, and I thank you :-)

    Cheers,
    John

Trackback URI | Comments RSS

Leave a Reply

«   - | -   »