In this article, i will tell you how to create a new Bluehost VPS account, and how to move WordPress website from old Bluehost VPS account to the newly created Bluehost VPS account and restore WordPress website on the new Bluehost VPS account. This is happened when i find new VPS account has discount.
1. General Guide Line.
Below is the steps to achieve this goal.
- Create new BlueHost VPS account.
- Create different CPanel for each website domain in 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 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 shutdown the website service in minutes.
2. Create New Bluehost VPS Account.
- Go to BlueHost VPS hosting page and select a plan.
- In the next page, you can either create a new domain or enter your existing domain name, then click Next button. The new domain is free for the first year.
- You should provide some personal information in the next page. Then the account will be created.
- When the account create complete, you can login to the VPS server in a terminal use 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 create 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 in left navigation page, then you can see all CPanel account list in 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 domain can use one ip address or different ip address.
- Click the Create a New Account button to go to create 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 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 old BlueHost VPS account. The backup file is created with 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 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 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 MySQL Databases link in DATABASES section.
- Then create a new MySQL database, add a new MySQL database user ( you had better use 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 command mysql -p -u user_name database_name < file.sql in terminal, we will write another article to show it more detail.
6. Un-assign Domain From Old Bluehost Account.
- Go to BlueHost home page and click Login link at top right corner.
- Input your old VPS account primary domain and password and login.
- Click domains link at top menu bar after login.
- Click one domain in bottom left, then you can click Un-assign link in bottom right to un-assign it.
7. Assign Domain To New Bluehost Account As Parked Domain.
- Go to BlueHost home page, click Login link at top right corner.
- Input your new VPS account primary domain name and password to login.
- Click domains —> assign menu item at top menu bar.
- Select an account owned domain from the list or input a new domain.
- Check Parked Domain radio button in step3.
- Click assign this domain button to assign it.
8. Change Domain DNS Record.
- Login BlueHost control panel from 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 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 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 article How To Avoid Download Web Page Instead Of Display In WordPress.
11. Fix Access WordPress Admin Page Error.
When i browse WordPress website admin page, i meet error message like There has been a critical error on your website. Please check your site admin email inbox for instructions. This error block me from access the WordPress admin page. Usually this error is because of PHP memory issue. So you should increase PHP memory in WHM. You can read article How To Increase PHP Memory In WHM to learn more.