Creating a website opens up a world of possibilities; however, finding the perfect home for your online presence is vital as it is the foundation of your website. In today's digital world, choosing the right hosting provider is similar to choosing the best location for your storefront: it has a direct impact on the performance, reliability, and, eventually, success of your website. Hostman offers affordable Wordpress hosting with quick load times, robust security, and simplified management. We provide the infrastructure and resources required to store, run and deliver your website’s content to users throughout the world.
Login to Hostman or sign up to create an account with Hostman.
Login to control panel with the created credentials.
Inside the control panel dashboard, click Create, then go to Cloud Server.
Start creating a new server. Select the specifications for the server; Operating system, Region, Plan, Network, and there are additional features to choose from according to the user’s preference. Once done, click Order with the amount specified depending on the selections made.
The newly built server will look like the image below.
Take note of the server details below which is found on the lower right side of the server page.
IPv4
SSH connection
Root password
Login to server via SSH using your terminal or the PuTTy App.
ssh root@server-ip
Proceed with the installation of WordPress.
3.1. Update the package list and the system:
sudo apt update && apt upgrade
3.2. Install the Apache web server.
sudo apt install apache2
3.3. Install MySQL and secure the installation.
sudo apt install mysql-server
sudo mysql_secure_installation
Remove anonymous users:
Remove test database and access to it:
Then reload:
Select password strength, it is recommended to choose Strong.
Database installation completed.
3.4. Login to database and create a database for WordPress.
CREATE DATABASE WordPress;
3.5. Create user for the WordPress Database named wordpress
.
CREATE USER ‘wordpress’@’%’ IDENTIFIED with mysql_native_password BY ‘Welcome@123’;
Note: In this syntax, Welcome@123
is the password that will be created. Make sure to change it with the user’s preferred password.
3.6. Provide all required permissions for WordPress user. To take effect, privileges should be reloaded.
GRANT ALL ON wordpress.* TO 'wordpress'@'%';
FLUSH PRIVILEGES;
3.7. Logout from Database.
EXIT;
3.8. Install PHP and necessary extensions:
sudo apt install php php-mysql libapache2-mod-php
3.9. Download the latest WordPress package from the official website and extract it:
wget https://wordpress.org/latest.tar.gz; tar xzvf latest.tar.gz; sudo cp -r wordpress/* /var/www/html/
3.10. Configure WordPress to connect to the database:
sudo nano /var/www/html/wp-config.php
Note: Make sure that details are matched with the details provided during the database installation.
3.11. Adjust the file and directory permissions
sudo chown -R www-data:www-data /var/www/html/
3.12 Restart the Apache web server to apply the changes.
sudo systemctl restart apache2
3.13. Complete Installation. Open a web browser and navigate to your server’s domain name or IP address, and complete the WordPress installation through the web interface. In our case, the address is https://66.248.207.252/wp-admin
.
3.14. Create WordPress admin username and password.
WordPress installation is completed.
Back-up the website files on your existing website.
To back up the files, download WordPress files to the local using WP plugins or FTP / WinSCP.
Using WINSCP:
Using Plugins:
After backup, proceed with migration. There are 2 ways to migrate; manual and by using WordPress plugins.
Manual migration:
On the existing website, go to Tools > Export > Choose what to export > All content.
Now, import WordPress to Hostman. Login to your new (Hostman) WordPress dashboard.
Go to Tools > Import > Run Importer.
Choose the WordPress files that was exported from the old website.
Migration completed.
Migration using plugin:
Go to WPvivid, click Database + Files (Wordpress Files), then click Backup Now.
Check progress, wait for the back-up to complete.
Download the backup files locally.
Import Your WordPress file to Hostman. Login to new WordPress admin site. Upload the WordPress file from back-up. Files can be seen in the download folder of the local machine.
Click Restore.
Restoring in progress. It will take time depending on the size of the WordPress file. Wait for the 100% completion.
Update the Domain Name Servers (DNS) in Hostman.
Add your domain name to the Hostman panel. In this example, the domain name is mywebsite.com
These are the DNS details from Hostman.
The website is now hosted in Hostman:
To summarize, migrating an existing WordPress site to a new host is a critical step in ensuring the continued success and growth of your online presence. By following a systematic approach, including backing up your website, selecting a reliable hosting provider, seamlessly transferring files and databases, and thoroughly testing the migrated site, you can mitigate the risks associated with the process and ensure a smooth transition.