I am moving a website from shared hosting to a VPS but I am unable to import the database correctly as I am getting a 500 error on my website. I will list the steps I have taken below, please could you check that I am not missing anything, thanks.
- I set up the VPS on Digital Ocean with the one click WordPress install and I set up the WordPress install etc.
- Uploaded the theme and plugins to the correct folders on the sftp.
- Created a new database on the VPS using Sequel Pro and then imported the old database to it.
Accessed the new database through mysql on the terminal and ran the following commands;
UPDATE sw13_options SET option_value = replace(option_value, 'https://olddomain.co.uk', 'http://newdomainIP') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE sw13_posts SET guid = replace(guid, 'https://olddomain.co.uk','http://newdomainIP');
UPDATE sw13_posts SET post_content = replace(post_content, 'https://olddomain.co.uk', 'http://newdomainIP');
UPDATE sw13_postmeta SET meta_value = replace(meta_value,'https://olddomain.co.uk','http://newdomainIP');
UPDATE sw13_options SET option_value = replace(option_value, 'https://olddomain.co.uk', 'http://newdomainIP') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE sw13_posts SET guid = replace(guid, 'https://olddomain.co.uk','http://newdomainIP');
UPDATE sw13_posts SET post_content = replace(post_content, 'https://olddomain.co.uk', 'http://newdomainIP');
UPDATE sw13_postmeta SET meta_value = replace(meta_value,'https://olddomain.co.uk','http://newdomainIP');
- Opened the config.php file and updated the database name to the new one and changed the table prefix to sw13_ and defined the site url.
Have I made a mistake or have I not done something?