• When I change the wp_ prefix in the config.php file and also change the prefix in the database my admin user no longer is able to log in. I can only get back into the Admin section if I change back to wp_ prefix in the database and config file.

    How can i change this prefix and update the user at the same time?

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you’re comfortable with accessing your database (via phpmyadmin, or similar), you need to get into the (yourprefix)_usermeta table, and find the record with a meta_key of ‘wp_capabilities’. This key value needs to be changed to ‘yournewprefix_capabilities’.

    If you don’t want to muck around in the database, I think the plugin wp security scan allows you to change your db prefix – I’d assume that they do this for you.

    Turns out I forgot 2 steps. You also need to change wp_user_level in your usermeta table, and wp_user roles in your options table. I ended up writing an entire post on how it works, found here:

    How to change your wordpress table prefix

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Changing WordPress Database Table prefix’ is closed to new replies.