(Advertisement)



 

27 November, 2010 (published)
  1 December, 2010 (last modified)
Ad  avatar

Safe upgrading to WordPress 3.0x in a few steps

  Categories: WordPress
  Tags: 

This website was using WordPress 2.7. I decided to upgrade to 3.01. It went very smoothly, and was done in half an hour. I do not trust the automatic upgrading supplied by WordPress as I really want to know what is going on. For instance because it could go terribly wrong.

The Internet fora are full of disappointed website administrators complaining about their ruined sites because of a failed automatic upgrade. You cannot in all honesty expect the existence of  a bullet-proof automatic upgrade from the WordPress people. Webhosters deal with firewalls and other security settings in wildly varying ways.

So my advice is to use the manual upgrade.  But in contrast to the advice of WordPress I suggest a different, safer way. The standard manual setup as advised by WordPress could give rise to problems as well. You should realize that a “problem”  in this case could be a commercial site loosing clients because the site is dead for hours if not days. With my solution it is at most dead for ten to twenty seconds. That is a glitch even CNN could afford (CNN is using WordPress by the way). The disadvantage of the method I propose is that it requires more time and it requires a good hoster, because my method entails considerable more site traffic and temporarily more disk space.

When you move a file on your computer, out of safety reaons this happens in two steps. First the file will be copied to the new place. If this has been successful, the old file will be deleted. If the first step would fail you still have the file. If this moving would be done in one step problems could lead to a loss of the file. All computer operating systems are full of these safety procedures.

This is also paradigm in computer programming:

TempVariable = A;
A = B;
B = TempVariable;

The values of A and B are swapped now.

Upgrade procedure:

  1. copied all active blog files to an empty  local directory that I had named “/local/company_blog_2.7/”.
  2. downloaded WordPress version 3.01 to an empty local folder that I called  ”/local/company_blog_3.01/”.
  3. ftp-ed the whole content of the “/local/company_blog_3.01/” folder to a new empty folder on my site that had called  ”/site/company_blog_3.01/”.
  4. edited the “/local/company_blog_3.01/wp-config-sample.php” with the content of  ”/local/company_blog_2.7/wp-config.php file”, that is the config file of my old site and copied it as “/site/company_blog_3.01/wp-config.php”  to the site and deleted the file wp-config-sample.php on the site .
  5. copied “/local/company_blog_2.7/.htaccess” to “/site/company_blog_3.01/.htaccess”.
  6. copied all files from  ”/local/company_blog_2.7/wp-content/” to “/site/company_blog_3.01/wp-content/”. This step can be quite time consuming (for this blog 10 minutes, but for my Dutch blog is was more than an hour.
  7. logged in to my control panel add used the facility to change the ownership of any file owned by “nobody”.
  8. backed-up the database by running a script that normally is run automatically.
  9. renamed the root-dir of the active blog “/site/company_blog/” to /site/company_blog_2.7/”.  Now the site is dead.
  10. renamed the folder “/site/company_blog_3.01/” to “/site/company_blog/”. Now the blog is alive again. The time to complete the previous item and this one was about 10 seconds.
  11. After I login I am asked to upgrade the database. This is done in a few seconds.
  12. I had to reactivate a few plugins and to restore a few disappeared widgets.

In case of problems reversing step 9 and 10 would restore the old blog. It went all very fast, also because the ftp of my hoster is lightning fast.

The only problem I had, with is not connected to the upgrading, is the failure of automatic plugin upgrading. This is a general problem for a major fraction of WordPress installations and is connected to the security settings of the webhoster. On the Internet solutions to this problem can be found. The solution that I used for my old blog worked again.

New theme
I am not planning to use a new theme, not even the one supplied by WordPress. My experience is that fiddling around with new css files is a nightmare. Not because it is so difficult, but because it is extremely time consuming. There is no standard for the structure of css files and editing them and looking at the results in various browsers easily takes a whole day.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
             

Schrijf een reactie

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.