Site update

The internet has been running very slowly in Ethiopia for most of the past week. This may be caused by congestion, or possibly by the cable that was severed near Egypt on Thursday.

But I’ve been able to get online this morning, so I took the opportunity to upgrade my website. I’m now using WordPress 2.7 for all the pages (instead of using PHP pages for static pages and WordPress for this blog).  That means, for example, that it is possible to add comments to almost any page on the website, and that site-wide search works.

I’ve also changed the design of the site in the hope that it looks more modern.  (I see now that the graphics which look good in Firefox look pretty ropey in Internet Explorer, so I’ll try to fix that later).

I encountered one technical problem during the updated.  When I tried to log in to the upgraded site, I got this message:

You do not have sufficient permissions to access this page.

If you get this problem, the solution is below the fold.

This problem seems to occur if you change the prefix of your table names in WordPress. The problem is that the database stores the table prefix and this means that your admin user does not get sufficient rights to access the administration panel.

The solution is to run the following two MySQL commands on your database (where ‘new’ is the new prefix and ‘old’ is the old prefix).

UPDATE `prefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'old_', 'new_' );

UPDATE `prefix_options` SET `option_name` = 'new_user_roles' WHERE `option_name` ='old_user_roles' AND `blog_id` =0;

Hat tip.

3 thoughts on “Site update”

  1. Hi Owen, did you use the <a href=””>WordPress Automatic Upgrade</a> plug-in to get to 2.7? I’ve just used it to upgrade four WP sites with approximately 10 mouse-clicks each – brilliant.And the nice folks at WP have just <a href=””>incorporated this functionality into 2.7</a>.  How cool is that? The same functionality also seems to exist in 2.7 for plug-ins.Nice theme too. Clean, modern.

    1. John – I am not using automatic upgrade, because as far as I can tell it requires me to make my WordPress installation world-writable, which I am reluctant to do for security reasons. Is there a way to set it up that does not require this?

  2. My WP install folders are 755 (so only writable by me, not global). You could always run a chmod 755 before running WPAU then revert back to something more secure after a successful install. Although I think that the automatic upgrade can try to get past this by <a href=””>using your FTP credentials</a>.P.S. Does your new theme allow HTML tags or line breaks in comments?

Leave a Reply

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