Sunday, February 13, 2011

How I went about moving and updating my ‘trapped’ Wordpress site

As the volunteer web-editor for a local non-profit, I decided to replace our old-style SHTML site with a new Wordpress CMS-based site. I didn't want to replace the current/live site, however, until I had a complete replacement (and the approval of the management). So I created the new Wordpress site as a temporary sub-site of our existing site. Unfortunately, because of the provider, Aplus.net’s, stupid install script the new site was ‘trapped’ – I could neither update the Wordpress software nor could I reconfigure any plugins. The primary reason for this was that Aplus.net had set it up as a (partly) shared install, i.e., some of the system files were in a shared read-only folder somewhere (not in my personal folders).

In order to remedy this I had to do the following:
  • make a backup of the new Wordpress sub-site
  • create a new properly-working copy in the new location
  • merge the two copies into a proper replacement site
  • confirm that I could update and configure everything properly
There were lots of instructions online about how to go about moving a Wordpress site but none seemed to apply to my situation -- un-trapping a script-created site!

MY FIRST UNSUCCESSFUL ATTEMPT

I initially tried installing an up-to-date copy of Wordpress as a new install, and confirmed that it worked properly by installing all the same plugins and theme as before. I also restored the ‘wp-content’ files from my original site. I then used the Tools > Import function to restore the “WXR” (.XML) file I’d exported from the original site. Unfortunately, this only restored the Pages but none of the theme or widget settings. As a last attempt I dumped the new site's MySQL database and restored it from a tweaked copy of the original DB (where I’d done a search-and-replace for all the URLs). For whatever reason this caused the whole setup to reset to defaults. Fail.

HOW I SUCCEEDED
  1. Deleted all the files in the new location and started over.
  2. Copied all the install files from a matched version of WordPress (v3.0.1 downloaded from their Release Archive).
  3. Manually updated only the wp-config.php.
  4. Copied all the files from the old site. I had to rename the script-created folder, 'wordpress-content', to match the standard folder-name, 'wp-content'
  5. Used the phpMyAdmin technique to download the SQL DB from the initial site in uncompressed text format.
  6. Manually fixed all the URL and folder references using search-and-replace:
    kobsd.org/wp >> kobsd.com
    kobsd.org >> kobsd.com
    wp/wordpress-content >> wp-content
    wordpress-content >> wp-content
  7. Went into phpMyAdmin on the new site, dumped all the tables and restored the edited SQL file.
  8. Finally, I tested the Wordpress auto-update as well as installing/configuring new plugins, and it all works properly!
________________

My struggles with Wordpress and Aplus.net

I am the volunteer web-master for a local non-profit. The web-site I inherited was a mess of hand-coded HTML and SHTML and was a nightmare to update. For the past 3 years I’ve limited myself to correcting and updating the text, and I’ve made copious notes about which HTML editors work or don’t work.

Now I’ve decided to re-do the site using a modern CMS and in particular I’ve chosen Wordpress. I thought this would be an easy process since Wordpress is extremely popular and our hosting provider, Aplus.net, includes an auto-install script in their Control Panel. Boy was I wrong about that ‘easy’ part! Yes, I was able to get the initial site setup in minutes but then I quickly started running into roadblocks – of the arbitrary kind put up by Aplus.net!

First, their install script only installed Wordpress 3.0.1 circa July 2010. I tried to update to the latest v3.0.5 using the built-in updater but I got an error message about access-rights. I asked Aplus.net about this and they said they didn’t support updates by users. Period. No other explanation, support ticket = Closed. I had to submit another request to ask if they were taking responsibility for installing Wordpress security updates and they said yes. (And then closed that ticket, too.) Needless to say, they haven’t updated anything.

Since I was still just experimenting with the software I decided to give the security updates a pass, for the moment. But then I discovered that I could not install new plugins either?! This time I picked-up the phone and called Aplus.net, and this time they were able to modify my installation to allow new plugins. So far, so good? No, because they also broke the site admin login! Yet another call to Aplus.net and finally everything seemed to be working.

THEN I realized that I couldn’t configure the plugins?! The 'wp-plugins' folder was apparently marked read-only even though it was in my personal site, not a shared folder. As if to stress the absurdity of the situation Aplus.net now said they could not ‘support’ third-party software. At this point I resolved to do a manual installation (and to find us another hosting provider).

Well... Yes, Wordpress is renowned for its ease of installation. Unfortunately, that’s dependent on your hosting provider providing accurate and up-to-date information about your account configuration. I tried to use Aplus.net's online knowledgebase but their article re MySQL configuration had the wrong server-host information. Again, I was forced to call Aplus.net and – to their credit – they were immediately able to point me to the Control Panel > MySQL Database Manager which listed the correct server-host. They also clarified that they use a custom MySQL port (3306). Finally, I was able to get a new manual install of WordPress to complete successfully.
________________