Restoring a WordPress site

There are two main parts to WordPress: the code, and the database. (There is also the plugin and theme parts, but I am grouping them with the ‘code’, although themes and plugins store some of their information in the database.)

You can recover the code by doing a fresh install of WP, although that won’t restore your themes/plugins, unless you have a copy of that. But a fresh install of WP may not point properly to the URL that your site uses.

That URL is contained in two locations of the wp-options table in your database. So you need to adjust those rows to contain the full URL of your site.

In addition, the code (file) of WP contain pointers to the database. Look at the wp-config.php file, which contains the database name and credentials. That has to match for the code to be able to ‘talk’ to the database, which contains all of the content.

All of that said, it is possible that your hosting place is backing up databases and files. So you might ask them if they can restore the files to your sites ‘public-html’ folder (the root folder of your domain). They may have a version of your WP ‘code’ files that will properly point to the database that you can (have?) restored.

So, your code must contain the pointers and credentials to your database, and the wp-options table contains the URL of your site, so that you can browse to the site URL.

Good luck!

tech