I have deleted my site! What do I do??!

3 min read

This can be one of the simplest problems to solve.

First, check to make sure you do not have a backup already. It’s possible you used All-In-One WP Migration and have a backup hidden away in Dropbox or locally on your computer.

If not, and you had local backups enabled within GridPane, you can follow the steps as outlined below. 

This can be one of the simplest problems to solve.

First, check to make sure you do not have a backup already. It’s possible you used All-In-One WP Migration and have a backup hidden away in Dropbox or locally on your computer.

If not, and you had local backups enabled within GridPane, you can follow the steps as outlined below. 

Backup Restore

  1. Create a new site with the same name and on the same server as the old site.
  2. Open the site configuration modal window and go to the Backups tab.
  3. In the Restore/Migrate/Clone section, choose Restore and select an available backup.

Voila! Your site is back in business!

Backup Credentials Incorrect

The steps here are no longer necessary.

We’re leaving the info purely for troubleshooting purposes should the  “backup credentials incorrect” issue ever appear during debug.

Step 1. Follow the same 3 steps:

  1. Create a new site with the same name and on the same server as the old site.
  2. Open the site configuration modal window and go to the Backups tab.
  3. In the Restore/Migrate/Clone section, choose Restore and select an available backup.

This restore will fail part way through, as right now it will not overwrite the existing database, or create a new one. It will, however, overwrite the wp-config.php and give you the details you need to recreate that database.

Step 2. Get your database details from your wp-config.php file

Open up your sites customizer and click on the link to open up your sites wp-config.php file.

Here’s an example of the details you will need:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'fMd_test2_com' );

/** MySQL database username */
define( 'DB_USER', 'fMd_test2_com' );

/** MySQL database password */
define( 'DB_PASSWORD', 'HWPkaEsYbQFtHhSahPXUgVOpS' );

Step 3. SSH into your server

Follow these guides to get starte

Step 4. Login to MySQL

Run the following command:

gp mysql login root

Step 5. Create your database

Run the following command, replacing “database_com” with your database name:

CREATE DATABASE database_com;

For example:

CREATE DATABASE fMd_test2_com;

Step 6. Create your database user

Run the following, switching out “database_com” with your database user, and “p@ssw0rd” with your database password:

CREATE USER 'database_com'@'localhost' IDENTIFIED BY 'p@ssw0rd';

For example:

CREATE USER 'fMd_test2_com'@'localhost' IDENTIFIED BY 'HWPkaEsYbQFtHhSahPXUgVOpS';

Step 7. Grant Permissions

Run the following, switching your database credentials again:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON database_com.* TO 'database_com'@'localhost';

For example:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON fMd_test2_com.* TO 'fMd_test2_com'@'localhost';

Also, alternatively, you could grant all privileges with this instead:

GRANT ALL PRIVILEGES ON database_com.* TO '$database_com'@'localhost';"

And finally, flush privileges with:

FLUSH PRIVILEGES;

Step 8. Re-run your Restore

Back inside your GridPane account, run your backup restore again to restore your website.

Step 9. Fix PHPMyAdmin 

Now we just need to set the correct database inside PHPMyAdmin. To do so, run the following command in your server, switching out “example.com” for your websites name:

gp site example.com -dbcreds