I was recently migrating a WordPress website from one server to another. Everything was setup correctly and had transferred over without issue, or so I thought.
When I attempted to view the website or access the WordPress backend login I was prompted to install WordPress, again.
In this article I review what might be causing the WordPress installation page to show up again even though WordPress is already installed and configured. It is assumed you have at least basic web hosting experience. If you are looking for a step by step instructional tutorial, you’ll have to try another Brave search result.
There are several possible reasons which may cause your WordPress installation script page to reappear:
- You may have entered the incorrect database credentials or are accessing the wrong database.
- You may have set the database table prefix variable ($table_prefix), within wp-config.php, incorrectly.
- Your connection to the database may be blocked by your hosting provider (least common)
The first two could simply be caused by a misconfigured wp-config.php file. While the later is caused by a hosting server block or restriction. Consult with your hosting provider for support on that block or restriction.
If you are migrating your WordPress website, like me, an incorrectly configured variable within your wp-config.php file is most likely the cause of the reappearance of the WordPress installation script. The good news, is that this should be a quick fix as you only need to correct the invalid variable.
To begin, access your webserver, either via FTP or cPanel and edit the wp-config.php file within the root directory of your migrated website. Once you have opened the wp-config.php file you will have to locate the following lines and check them for accuracy:
define( ‘DB_NAME’, ‘ensure-you’re-using-the-right-database-name-here’ );
define( ‘DB_USER’, ‘ensure-right-user-WITH-proper-privilege’s-to-above-database‘ );
define( ‘DB_PASSWORD’, ‘ensure-your-database-user-password-is-correct‘ );
define( ‘DB_HOST’, ‘localhost-is-default-check-with-your-hosting-provider‘ );
Further down the wp-config.php file, locate the following variable and ensure that your table prefix matches the tables within the database by using a tool such as phpMyAdmin. The table prefix variable should read as follows:
$table_prefix = ‘wp_’;
This usually boils down to me failing to correctly match up the server variables. So once you have correctly set your database variables, save wp-config.php and check the website which should be displaying correctly, now.
I welcome your thoughts, questions or suggestions on my article on how to fix WordPress asking me to reinstall WordPress.
Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.