Sign In
Sign In

How to Host and Transfer WordPress on Hostman Server

How to Host and Transfer WordPress on Hostman Server
JC Brian Refugia
Technical writer
Wordpress
19.03.2024
Reading time: 5 min

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 provides the infrastructure and resources required to store, run and deliver your website’s content to users throughout the world. 

Creating a New Server Instance in Hostman

  1. Login to Hostman or sign up to create an account with Hostman. 

Image35

  1. Login to control panel with the created credentials.

Image51

  1. Inside the control panel dashboard, click Create, then go to Cloud Server.

Image12

  1. 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. 

Image29

  1. The newly built server will look like the image below.

Image47

Install and Configure WordPress on the New Server

  1. Take note of the server details below which is found on the lower right side of the server page.  

    • IPv4

    • SSH connection

    • Root password

Image49

  1. Login to server via SSH using your terminal or the PuTTy App.  

ssh root@server-ip
  1. Proceed with the installation of WordPress.

3.1. Update the package list and the system:

sudo apt update && apt upgrade

Image50

3.2. Install the Apache web server.

sudo apt install apache2

Image36

3.3. Install MySQL and secure the installation. 

sudo apt install mysql-server

Image42

sudo mysql_secure_installation

Image30

Remove anonymous users:

Image11

Remove test database and access to it:

Image40

Then reload:

Image34

Select password strength, it is recommended to choose Strong.

Image18

Database installation completed. 

Image38

3.4. Login to database and create a database for WordPress.

CREATE DATABASE WordPress;

Image21

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.

Image10

3.6. Provide all required permissions for WordPress user. To take effect, privileges should be reloaded.

GRANT ALL ON wordpress.* TO 'wordpress'@'%';

Image26

FLUSH PRIVILEGES;

Image43

3.7. Logout from Database.

EXIT;

Image17

3.8. Install PHP and necessary extensions:

sudo apt install php php-mysql libapache2-mod-php

Image2

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/

Image14

3.10. Configure WordPress to connect to the database:

sudo nano /var/www/html/wp-config.php

Image19

Note: Make sure that details are matched with the details provided during the database installation.

Image6

3.11. Adjust the file and directory permissions

sudo chown -R www-data:www-data /var/www/html/

Image9

3.12 Restart the Apache web server to apply the changes.

sudo systemctl restart apache2

E15a7abb 254f 4913 99a4 0eb35c2ac9b1

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.

Image32

3.14. Create WordPress admin username and password.

Image45

WordPress installation is completed.

 Image37

Transferring Existing WordPress Site to Hostman Server

  1. 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:

Image27

Using Plugins:

Image16

  1. 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.

Image39

Now, import WordPress to Hostman. Login to your new (Hostman) WordPress dashboard.

Image41

Go to Tools > Import > Run Importer.

Image25

Choose the WordPress files that was exported from the old website.

Image52

Migration completed.

Image23

Migration using plugin:

Go to WPvivid, click Database + Files (Wordpress Files), then click Backup Now.

Image33

Check progress, wait for the back-up to complete. 

Image44

Download the backup files locally.

Image28

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.

Image15

Click Restore.

Image31

Restoring in progress. It will take time depending on the size of the WordPress file. Wait for the 100% completion. 

Image48

  1. 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

Image5

These are the DNS details from Hostman.

Image20

The website is now hosted in Hostman:

Image22

Conclusion

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.

Wordpress
19.03.2024
Reading time: 5 min

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start
Email us