Restore WordPress site from backup

I’m doing regullar backups using BackUpWordpress plugin.

Find the backup my-site-complete-backup.zip file in directory like this /var/www/wordpress/wp-content/backupwordpress/ and copy it to new WordPress site location.

cd /var/www/wordpress/
unzip my-site-complete-backup.zip
mysql -h localhost -u root -p database-name < my-site-complete-backup.sql
rm -f my-site-complete-backup.sql

If you moved your site to another domain name, you will need to do this hack.

/var/www/wordpress/wp-login.php

Find this line:

require( dirname(__FILE__) . '/wp-load.php' );

and insert the following lines below:

update_option('siteurl', 'http://your.domain.name/the/path' );
update_option('home', 'http://your.domain.name/the/path' );

Login to WP runing on new domain: https://your.domain/wp-admin/

Do not forget to remove hack lines in the end!

Print Friendly, PDF & Email