Today we were transferring a WordPress site to our test server to do some work, usually simple enough and something we’ve done hundreds of times. The transfer of the all the wp-content files and database file went smoothly, but upon attempting to login we kept getting the install screen from WordPress (install.php). At first we thought it might be a corrupt database or .htaccess issue, but after reviewing both we found no issues and the install.php page was still appearing. Finally we found the issue. The solution is simple and afterward (if this works for you) you’ll feel like a bonehead for not noticing it. The issue came down to needing to change the table prefix in wp-config.php to match the transferred database. Yes, as I said, stupidly simple.
- Log into phpmyadmin or look at the wp-config.php file on the server you are transferring from and find the table prefix value.
- Copy this value, then open up your wp-config.php file on the server you are transferring to.
- Find $table_prefix around line 71 and replace the current value with the one that you copied in step 2.
- Save it to your server and then go to yoursite.com/wp-admin