Rebuilding WordPress…

This content is 14 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

This post comes with an apology – to Alex Coles, who often helps me out with the development of this site, and who, after encouraging me to update it to the latest version of WordPress (late last night, at a pub, over a 3G mobile connection) was the recipient of my frustration when it failed with an HTTP 408 error and a message that said something about a slow connection. Sorry Alex.

Despite having been given a torrent of abuse, Alex was gracious enough to give me the advice that allowed me to rebuild the site. I was lucky that it had stayed up, albeit in some kind of weird state that said it was WordPress v3.0.1 but was probably still v2.9.2; however, attempts to reinstall WordPress were futile – and a failed plugin update left the site stuck in maintenance mode (the answer to which seemed to be wait a few minutes, although I also found advice which suggested deleting the .maintenance file).

So, this afternoon, I set about rebuilding the site, by installing a parallel copy of WordPress, although the database has not been changed (I do have a backup of that, if it becomes necessary to restore it).

  1. The first thing to do was to download the latest copy of WordPress. I’m on a Linux host so I downloaded the .tar.gz version but Windows users may prefer a .zip.
  2. After extracting the archive to a suitable location on my webspace (the web root was fine, as the extraction automatically created a /wordpress subdirectory).
  3. I then copied over the customised elements of the old site from /wp-content including themes, plugins, uploads and other data that my blog uses (for example, images that are not in my uploads folder, and JavaScript that I use to run some of the advertisements on the site).
  4. Next, I copied some of the critical files that control the WordPress configuration: wp-settings.php, wp-config.php and .htaccess.
  5. Finally, I renamed the old /blog folder, and renamed /wordpress to /blog before testing site access.

With everything working well, I can delete the old /blog subdirectory but I’ll leave it for a while, “just in case” – although it’s probably worth editing /robots.txt to stop search engines from indexing the old site alongside the new one.

I should probably breathe a big sigh of relief now, but I’m in the mood for site development so, if you see the site theme change a few times over the coming weeks, bear with me!

3 thoughts on “Rebuilding WordPress…

  1. I had to go through a site rebuild a few months back – surprisingly it was fairly easy, took a couple of hours, but it was a good exercise to go through.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.