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

Let’s say when you visit, 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 This will redirect to

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.

This site uses Akismet to reduce spam. Learn how your comment data is processed.