How To Restore WordPress Website From Backup

WordPress is widely used in current web site building. And backup is very important. This article will show you how to restore a WordPress website from a previous backup file.

  1. Login to your WordPress website admin console. And download the latest website backup file. I use BackWPup wordpress plugin to create website daily backup.
    download wordpress backup file
  2. After download, extract the zip file to a local folder. And then copy all the files in the folder to your local website root folder. My local website folder is C:\xampp\htdocs\wordpress.
    copy wordpress backup files to local website folder
  3. Please note the highlighted file in above picture. backwpup_13910f01_twothrp0_ss_dbnamedcb.sql. This file is the website database backup file. From the file name, we can see the database name is twothrp0_ss_dbnamedcb.
  4. Open a mysql admin manager, i use SQLyog community version. Right click left panel, click ” Create Database” menu to create database twothrp0_ss_dbnamedcb in it. Please Note the database charset should choose utf8 and database collation choose utf8_bin.
  5. Right click the database name, click ” Import —> Execute SQL scripts… ” to select above database backup sql file to execute.
    import website database backup fileexecute backup sql scripts dialog
  6. When execution complete, press F5 to refresh left panel tree, you can see all bakcup tables and data has been added in the database.
  7. Right click wp_uhau_options table, click ” Open Table ” in popup menu list. And change siteurl and home column value to your local url in right panel like below picture. My local siteurl and home value is http://localhost/wordpress/. Do not forget click the blue soft disk icon in table data list top tool bar to save your update.
    edit wp_uhau_options table siteurl and home column value
  8. Open wp-config.php file which saved in your local website root folder like C:\xampp\htdocs\wordpress in a text file editor. Get the database user name and password from the file.
    get the database username and password
  9. Create a user account with above username and password in mysql server use SQLYog. Do not forget assign all previleges for operating database twothrp0_ss_dbnamedcb to the user.
    create mysql user account
    assign previleges to mysql user
  10. Now open a web browser, browse url http://localhost/wordpress/wp-admin and login to admin console. If you see below error message that means the database user privileges is not granted correctly. You should change the user Host to localhost and restart mysql server in xampp to make it take effect.
    Error establishing a database connection
    error establishing a database connection

    change mysql user host to localhost

  11. Click ” Settings —> General ” menu in left panel, do not edit any field, just click ” Save Changes ” button to save it.
  12. Click ” Settings —> Permalink ” menu in left panel, also do not edit any field, just click ” Save Changes ” button to save it.
    You can also change plugins or check wordpress update in the admin console.
    save general and permalinks settings in wordpress admin console
  13. Now the restore process compele successfully. Logout admin console, browse url http://localhost/wordpress/, you can find your local website execute normally.
(Visited 86 times, 1 visits today)
READ :   How To Add Google Adsense Ads In Your Wordpress Themes

Leave a Reply

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

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