In this article, I will tell you how to create a new Bluehost VPS account, and how to move a WordPress website from the old Bluehost VPS account to the newly created Bluehost VPS account and restore the WordPress website on the new Bluehost VPS account. This happens when I find a new VPS account that has a discount.
1. General Guide Line.
Below are the steps to achieve this goal.
- Create a new BlueHost VPS account.
- Create a different CPanel for each website domain in the new VPS account WHM.
- Download website WordPress backup file and restore it to new VPS domain folder.
- Create MySQL database, import SQL data to the database, and edit database configuration data in each WordPress website wp-config.php file.
- Un-assign domain from old VPS account, and assign the domain to a related folder in the new VPS account.
- Change domain DNS settings, and Ezoic DNS settings.
- That’s all. In this way, only reassign domain will shut down the website service in minutes.
2. Create New Bluehost VPS Account.
- Go to the Bluehost VPS hosting page and select a plan.
- On the next page, you can either create a new domain or enter your existing domain name, then click the Next button. The new domain is free for the first year.
- You should provide some personal information on the next page. Then the account will be created.
- When the create account process complete, you can log in to the VPS server in a terminal use the command ssh [email protected]<your-vps-server-ip>.
- You can find a folder is created in /home directory, this folder is just created for the domain you select or entered.
- After creating the account, you can access the WHM admin page use URL HTTP://<your-vps-server-ip>:<whm-port>.
3. Create Different CPanel For Each Domain In WHM
- Login to the WHM admin page with url https://<your-vps-server-ip>:<whm-port> use root user.
- Click Account Information —> List Accounts menu on the left navigation pane, then you can see all CPanel account list on the right page.
- Each CPanel account includes domain name, IP address, user name, etc.
- You can click the
+icon at the beginning of the account to expand it. Then change the domain used IP there. All the domains can use one IP address or different IP addresses.
- Click the Create a New Account button to go to create a new account page.
- Input the account domain, username, password, etc.
- In the DNS Settings section, check the checkbox before Use the nameservers specified at the Domain’s Registrar. (Ignore locally specified nameservers.).
- Click Create button, then it will create a new account.
- Each account has it’s own CPanel admin site, you can use the account username and password in the domain CPanel admin site login page HTTPS://<your-vps-server-ip>:<cpanel-port> to login.
- You can also click the CP icon in the List Accounts page to go to each account-related CPanel admin site.
- Each account will also create one folder in the VPS server /home directory, the folder name is just the account username.
4. Download Website WordPress Backup File And Restore It To New VPS Server Account Domain Folder
- Download each WordPress website backup file from the old BlueHost VPS account. The backup file is created with the WordPress plugin BackWPup.
- Upload above backup file to related folder ( for example : /home/<domain_account_username_folder>/public_html/ ) in new Bluehost VPS account.
- Unzip the compressed file in the above folder. The unzip command is unzip -d /home/<domain_account_username_folder>/public_html/ file.zip, -d specify the target folder. If you do not install unzip then run the command yum install unzip to install it.
5. Create MySQL Database Use Bluehost CPanel —> database tools —> MySQL Databases.
- Login to the domain website CPanel admin site from WHM.
- Then Click the MySQL Databases link in the DATABASES section.
- Then create a new MySQL database, add a new MySQL database user ( you had better use the same database password stored in WordPress wp-config.php file), assign all privileges to the new user on the database.
- Edit the file /home/<domain_account_username_folder>/public_html/wp-config.php. Replace DB_NAME, DB_USER‘s value with above database name and user name.
- Click phpMyAdmin link in CPanel DATABASES section to open phpMyAdmin page, then import the WordPress website database data from the .sql backup file. The .sql backup file should be found in folder /home/<domain_account_username_folder>/public_html/.
- If the .sql backup file is too large ( bigger than 50MiB), then we should import it with the command mysql -p -u user_name database_name < file.sql in a terminal, we will write another article to show how to use it in more detail.
6. Un-assign Domain From Old Bluehost Account.
- Go to the BlueHost home page and click the Login link at the top right corner.
- Input your old VPS account primary domain and password to log in.
- Click domains link at top menu bar after login.
- Click one domain in the bottom left, then you can click the Un-assign link on the bottom right cPanel type area to un-assign it.
7. Assign Domain To New Bluehost Account As Parked Domain.
- Go to the BlueHost home page, click the Login link at the top right corner.
- Input your new VPS account primary domain name and password to log in.
- Click domains —> assign menu item at top menu bar.
- Select an account-owned domain from the list or input a new domain.
- Check the Parked Domain radio button in step3.
- Click the assign this domain button to assign it.
8. Change Domain DNS Record.
- Login BlueHost control panel from the BlueHost home page.
- Click domains.
- Select one domain.
- Click Domain —> Manage DNS records in DNS Zone Editor section.
- Then you can change the DNS record there (change DNS IP address).
9. Change Ezoic DNS Settings.
- Login to Ezoic admin page.
- Click Settings menu item at the top menu bar, select one domain, then scroll down to DNS SETTINGS area.
- Update the domain IP address in A record.
- You do not need to change IP address in Cloudflare, because Ezoic will do it for you in Cloudflare automatically.
- That’s all.
10. Fix Download Home Page When Browse Domain Error.
- After the above steps, the WordPress website has been restored successfully. But when you browse it, you will find it will download the index page instead of display it.
- To fix this issue, you can read the article How To Avoid Download Web Page Instead Of Display In WordPress.
11. Fix Access WordPress Admin Page Error.
- When I browse the WordPress website admin page, I meet an error message like There has been a critical error on your website. Please check your site admin email inbox for instructions. This error blocks me from access the WordPress admin page.
- Usually, this error is because of a PHP memory issue. So you should increase PHP memory in WHM. You can read the article How To Increase PHP Memory In WHM to learn more.