Reply To: Restore wordpress site from backup


Hey Amine, welcome to WorP’Dev. I’m Nabil, The WordPress Developer. I will be glad to assist you.

Since you don’t have a database backup, you won’t be able to create an exact copy of the previous website. The database contains important data such as website, plugin and theme options, posts metadata, etc.

Here is how I would do it:

STEP 1 – Prepare a WordPress Installation

  1. Install WordPress normally on the new server.
  2. Extract the uploads folder (.../wp-content/uploads/) from the tar.gz file and copy its contents into the new website’s uploads folder.
  3. Do the same with the wp-content/themes and wp-content/plugins folders.
  4. Go to your dashboard and enable the theme you want to use and the plugins you still want to use. Feel free to delete the ones you no longer want.

STEP 2 – Prepare the WXR File

  1. Open (a copy of) the WXR file and do a search and replace, you need to replace the old website URL with the new one. We need to do that so that the WordPress Importer can find the attachments and can import them.
  2. Once you do the search and replace, look for an occurrence of the attachment_url XML element which contains the new URL and test the URL in the browser, it should show the image.
  3. Test another few (2 or 3) URLs just to make sure they are correct then save the new copy of the WXR file.

STEP 3 – Import with the WordPress Importer

  1. In your dashboard, go to “Tools > Import”.
  2. Under “WordPress,” if you haven’t already installed the importer, click “Install Now.”
  3. Click the “Run Importer”, provide the WXR file then click “Upload file and import.”

Give this a try and let me know if you need further assistance.