Hello Devz,
Migrate a WordPress website can be a pain in the ass. But if you follow this procedure, it should be quite simple…
Let’s considere:
A = source site (ex: myoldwebsite.com)
B = destination site (ex: newwebsite.com)
- Backup source site:
1. Deactivate all plugin in A (use the Select All the select Desactivate)
2. Install plugin UpdraftPlus on A (Plugins / Add New)
3. Click on Backup (Settings / UpdraftPlus Backup) and save the files locally
- Prepare the new web site:
4. Download the latest version of WordPress
cd /var/www/html/ sudo wget http://wordpress.org/latest.tar.gz sudo tar xzvf latest.tar.gz sudo mkdir /var/www/html/newwebsite sudo cp -a /var/www/html/wordpress/* /var/www/html/newwebsite/
5. Give the permissions to the files and folders:
sudo chown -R www-data:www-data /var/www/html/newwebsite sudo find /var/www/html/newwebsite/ -type d -exec chmod 755 {} \; sudo find /var/www/html/newwebsite/ -type f -exec chmod 644 {} \;
This line:
chown -R www-data:www-data your-wordpress-directory
It’s for the Web Server Ownership. And:
sudo find /var/www/wordpress/ -type d -exec chmod 755 {} \;
sudo find /var/www/wordpress/ -type f -exec chmod 644 {} \;
It’s for the Directory Permissions.
If it still doesn’t work, you can still try to add the code in wp-config.php:
define('FS_METHOD', 'direct');
6. Create your empty DataBase in phpMyAdmin
7. Install the WordPress plugin UpdraftPlus on B
- Restore the web site:
8. Open the plugin and restore the files on B
9. Adapt wp-config.php with:
define(‘WP_HOME’,’http://newwebsite.com’);
define(‘WP_SITEURL’,’http://newwebsite.com’);
and the DB configuration
10. Login to site B and remove Permalinks (Plain) (Settings / Permalinks)
11. Install Velvet Blues Update URLs plugin on B
12. Go to Tools and update the URLs for all (links, pictures, …)
Enjoy! 🙂