9
May

Wordpress error

   Posted by: Vlad   in Wordpress

After installing a WordPress Blog I started installing some useful plugins. One of them was WP Security Scan. One of the errors in the initial scan was that I had the wp_ prefix in the tables of my database. So I followed the instructions and changed them. But after that, each time I use tried to log in, I get:

You do not have sufficient permissions to access this page.

I couldn’t enter the admin page, or any post, nothing was working. But after a few moments of documentation I found out that the meta_key in the usermeta table values were still tied down to:

  • wp_user_level
  • wp_capabilities
  • wp_autosave_draft_ids

Of course I had to update it to my new prefix mynewprefix

  • mynewprefix_user_level
  • mynewprefix_capabilities
  • mynewprefix_autosave_draft_ids

The SQL statement I used was:

UPDATE `mynewprefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , ‘wp_’, ‘mynewprefix_’ );

(Make sure you do backups first! Note that the quotes used for string and field name are different, and replace mynewprefix with your own) In the options table, there is

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

This entry was posted on Friday, May 9th, 2008 at 9:59 am and is filed under Wordpress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment