I've two wordpress websites : - One online in FTP folder "www", for this website everything's ok ! - The second website is on localhost for the moment.

I would like to put the second website on the same database that the first "coreevenuh" but with table_prefix different "wp2_" What the step I've to follow ?

I've try many options but no way...

Here are the steps I've followed: -Download .sql local database -Open .sql local database, change every wp_ to wp2_ , every localhost/wordpress to domainname.com (my domain name). -Go on phpmyadmin.ovh to import my .sql, so I've every tables with wp2_ -Open config.php, change nothing from the first website online, just $table_prefix = 'wp2_'; -Upload every files on Filezilla in www2 folder.

Have I to make the Wordpress installation before or after to import .sql on phpmyadmin ?

Please tell me what I'm making wrong, I've a problem with profile when I want to connect to wp-admin...

UPDATE : My problem is "You do not have sufficient permissions to access this page." when I try to access to wp-admin

fix it :)

  • So you're asking essentially a migration question? You're correct the two installs must have separate table prefixes, though your www folder stuff is host specific, we can't advise on that, you'll need to contact your host. Can you confirm you're able to get a second working blank/empty WordPress install? If so that simplifies your question greatly
    – Tom J Nowell
    Mar 4, 2015 at 18:43
  • @TomJNowell Yes, I can. If i don't import .sql in phpmyadmin, I can see the wordpress page installation. But Have I to make the wordpress installation before or after to import .sql ? And the main page of the second website works, just redirection on other page don't seem to work... and wp-admin don't work, I don't have the permission with my user...
    – Vjardel
    Mar 4, 2015 at 18:46
  • The installation installs the database tables, if you're doing an sql import it's irrelevant. If your import is succesful and you visit the site, then you won't be given the option to install. Eitherway your question should go back to the original problem you have: "I have a blank empty install of WordPress on my server, I need to move my content from my local machine to this install, how do I do it?" All this talk of multiple installs in the same databases and phpmyadmin is confusing
    – Tom J Nowell
    Mar 4, 2015 at 18:47
  • @TomJNowell No it's ok, my main page appears like I want
    – Vjardel
    Mar 4, 2015 at 18:49
  • You should post your 2nd update as an answer, instead of an edit. It's OK to answer your own question, and you can accept it now that it's been more than 48 hours since you posted the question.
    – Gabriel
    Mar 9, 2015 at 1:12

1 Answer 1


How to fix it ? Go in SQL and write this code :

UPDATE `wp2_usermeta` SET `meta_key` = REPLACE(`meta_key`, 'wp_', 'wp2_');
UPDATE `wp2_options` SET `option_name` = REPLACE(`option_name`, 'wp_', 'wp2_');


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.