Just created first WP site in Local on my PC. No content added yet, but I want to change the database table prefix. I can’t find clear instruction for this.
Troubleshooting Questions
Are there some clear instructions for how to change the Wordpress Table prefixes?
Basically just use Adminer (in the Database tab of your site in Local) to edit each table, renaming it with the new prefix. Then go and edit the table prefix in the wp-config.php file.
Thank you Alex for assisting!
I changed the Table prefixes inside Adminer on my Windows PC. I used the SQL command ALTER TABLE table_name
RENAME TO new_table_name; (This appeared to work
I then changed the wp-config.php file \local-sites\mysite\app\public ($table_prefix = ‘abc_’
But now I can’t open the Admin of the site. I get the error “Sorry, you are not allowed to access this page.”
Thank you Alex for getting on the right track. I have now solved the problem.
There other references to the previous table prefixes lurking within the tables. I did a search to find them:
SELECT * FROM wp_mynewprefix_options WHERE option_name LIKE ‘%wp_%’
Then manually changed each row found with a reference to the old wp table prefix. Hopefully there are no further problems - but this is just on my PC!
It would be helpful if explicit instructions were available for people using Local for the first time.