Re-Install WordPress

Let’s say you have a test install of WordPress 4.7.4 and you accidentally delete the database.

Let’s say you have created an empty test database.

Let’s say all your WordPress files are still there. wp-config.php already points to your empty test database.

Let’s say your DNS and virtual host still point to test.mysite.com.

Let’s say when you visit http://test.mysite.com, you get the message “This page isn’t redirecting properly.”

How do you get the database back?

Do not try this on a live WordPress installation! You will probably lose all your data.

1. Download WordPress to your local machine and extract the files.

2. Upload wp-admin/install.php to your test site.

3. Go to http://test.mysite.com. This will redirect to http://test.mysite.com/wp-admin/install.php.

This time the install starts and you get the familiar installation steps:

WordPress re-install 1

4. After the install, delete the wp-admin/install.php file if it is still there. Test the site, then back up the MySQL database.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.