With VPS (Virtual private server) we get more power and full control for quite equal price in comparing with shared hostings. It started from 5$ per month (e.g. Contabo or Server4You). The main disadvantage from shared hostings is requiring installation and configuration.
It looks complicated but it contains only 3 main steps.
Choose and setup server
Just choose any liked provider and server type. We recommend to use next providers due to good prices and given power: Contabo (excellent combination of price and German’s quality, and many awards), Server4You (Europe and USA region), OVHCloud, Hostens, CloudWays (Linode is recommended for India region), MakeCloud (Asia and Russia region).
Let’s look at the process in Contabo.
- Go to the VPS page (or VDS or VPS with big HDD storage if needed), select the needed plan and click the ‘Select’ button.
- Next, select the needed set of options. Please, choose Ubuntu as operating system. Also, set root’s login and password – it will be required in further steps. Then, click ‘Next’.
- Do payment (note that the server installation fee depends on the selected payment period).
- Now, wait for a letter from Contabo about the completion of the installation and server’s IP address. Now you have become the owner of a VPS server!
- Finally, set the new server’s IP address for our site name.
- If previous site is needed to be alive while configuring the new one, real DNS adjusting should be done as the last step (after installing WordPress part). And the new IP should be temporary set by using Awesome Host Manager Chrome Extension by adding mapping of IP to domain name.
After testing is complete, the temporary mapping should be removed and the next step should be done finally.
Install and configure control panel
To save money, we will install popular free aaPanel that it is very powerful and flexible. FastPanel is also free, but it has smaller features. Also, many hosting providers offer paid control panels like powerful cPanel – it can be definitely used too.
Install
- Run any SSH client (Mac, Windows), connect using server’s IP address, and login there using and root’s login and password that were setup while server installation.
- Begin installation process by typing below command and pressing enter:
sudo apt-get update && sudo apt-get install wget && sudo wget http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && sudo bash install-ubuntu_6.0_en.sh
During installation, please, type
y
to the questionDo you want to install aaPanel to the /www directory now?(y/n)
and typeyes
to the questionDo you need to enable the panel SSL? (yes/n)
. - After successful installation, information with a panel’s Web-address, login and password for entering the control panel will be displayed, for example:
==================================================================
Congratulations! Installed successfully!
==================================================================
aaPanel: https://192.168.100.31:7800/c2a6f9dd
username: abc
password: ef1e70fe
Warning:
If you cannot access the panel,
release the following port (7800|888|80|443|20|21) in the security group
==================================================================
Time consumed: 2 Minute!
Note. On some hostings (except Contabo), it will be necessary to open the specified ports in the firewall manually.
Configure
- Enter in browser provided address (e.g. https://192.168.100.31:7800/c2a6f9dd).
Then, login to our control panel via provided username and password.
- Setup packages. Choose default set if not sure.
Then wait for installation completion. It can take some time, please, be patient.
Now the window can be closed.
- Turn off ‘putenv’ in PHP’s settings.
- Enable SSL for ‘phpMyAdmin’.
Warning. If previous site is needed to be alive while configuring the new one, the SSL related setting mentioned below shouldn’t be used. So, SSL should be configured separately via site’s SSL settings by entering existed SSL certificate data in ‘Other certificate’ tab.
If NGINX is used (it is by default) then setup WordPress rewrites.
Deploy WordPress
Two ways:
Move or copy existed installation
It can be done by:
It is more complex but it allows to copy large database and files.
- Using Duplicator or UpdraftPlus plugin
It is simpler but there can be problems with copying large data due to PHP often has limits to file size and execution time.
Note. If new site doesn’t work then there will be a need to correct some configuration files and database tables that is out of scope of current manual due to complexity and variability of possible issues.
Manual mode
There will be needed a copy of site’s directory content as zip
file e.g. files.zip
(it should contain files like ‘wp-config.php’ and all other files from WordPress directory). Also, there will be needed a database copy as sql
or sql.gz
file e.g. database.sql.gz
. It can be made manually of got from backup.
Then, extract it.
- Import database
database.sql.gz
file. When importing is finished the window can be closed.
Using Duplicator plugin
Download and install Duplicator plugin on the source site. Ensure that backup exists in source site or make it.
- Now, just upload (as in manual mode) all created files to our new website path.
- Then in browser run site’s name appended with
installer.php
e.g.https://mysite.com/installer.php
and follow onscreen instructions.
Using UpdraftPlus plugin
Download and install UpdraftPlus plugin on the source site. Ensure that backup exists in source site or make it.
- Create new WordPress destination installation and install UpdraftPlus plugin there.
- Now, just upload (as in manual mode) all backed up data to our new website path under
wp-config/updraft
directory, e.g./www/wwwroot/mysite.com/wp-config/updraft
. - Finally, in destination site admin in ‘Settings -> UpdraftPlus Backups’ run searching new files and restore found backup.
New installation
- Upload and extract (as in manual mode) needed ZIP WordPress archive to
/www/wwwroot
. - Then delete existing website directory (e.g.
mysite.com
) and renamewordpress
directory to website directory’s name. - Then in browser open website name (e.g.
https://mysite.com
) and follow onscreen instructions.
Finish
If the previous site was kept alive while instilling the new one then now a temp DNS can be disabled and the new IP can be set in DNS settings.
More information can be discovered in the original post about Install VPS (Virtual private server) with WordPress and on the main site.
Comments
Post a Comment