How to Install WordPress on a Virtual non-public Server (VPS)

virtual private server - How to Install WordPress on a Virtual non-public Server (VPS)

The first time you check in for a hosting arrange is terribly confusing. There’s shared hosting, a fervent server, managed services, and even a Virtual non-public Server (VPS) to decide on from. There square measure lots of choices to require it, and therefore the drawback lies in knowing which sort of arranging you actually want.

VPSs square measure a natural progression from shared hosting, however, the name makes them sound too sophisticated. during this article, we’re getting to offer you a full breakdown of what a VPS is and once you ought to think about employing one. Then, we’ll teach you the way to put in WordPress a VPS in four easy steps. Let’s get to it!

What a VPS Is (And once you ought to take into account Upgrading to One)

With shared hosting, you occupy a similar server as alternative users do. this suggests you share resources with everybody else, which frequently results in performance problems if your website needs slightly additional juice. In distinction, a VPS permits you to still share one physical server, however you get a virtual instance to host your website. Let’s break down why this is often excellent news for you:

  • You get a group quantity of resources. once you check in for a VPS, you get a group quantity of memory, storage, and information measure, and you don’t have to be compelled to share those resources with anyone else.
  • They’re simple to upgrade. In most cases, you’ll raise your hosting supplier to feature additional resources to your VPS at a moment’s notice.
  • You get full management over your server. despite the fact that you’re handling a virtual server, you continue to get full management over it.
  • They’re usually affordable. To be additional specific, you’ll simply realize powerful starter VPS plans at below $10 per month.

In our opinion, once your WordPress website outgrows shared hosting, you have got 2 choices once it involves upgrading. you’ll either check in for a VPS arrange or instead attempt managed WordPress hosting.

As you’ll understand, managed WordPress hosting plans square measure all concerning convenience. However, once it involves performance, you’ll most likely just do similarly if not higher with a VPS. the sole distinction is, a VPS incorporates a longer learning curve if you opt to line it up manually. this suggests configuring your server, tweaking it to run WordPress, and putting on the platform itself. We’ll cowl the way to try this later.

How to Install WordPress on a VPS exploitation Your Hosting electrical device

There square measure lots of nice choices once it involves WordPress-friendly VPS services. However, we’re a fan of Vultr due to its accessible costs and wonderful performance. You’re liberated to opt for any supplier you wish to host your website, except for this tutorial, we’re getting to use Vultr as an associate example. you’ll} have to be compelled to check whether or not your host will allow you to come upon a VPS through your account dashboard. If not, you’ll need to skip to succeeding section, wherever we tend to point out the way to install WordPress manually via the command.

Assuming you’ve already signed up for a Vultr account, your next step is going to be to log into it and head to the Servers tab on your dashboard:

plus sign - How to Install WordPress on a Virtual non-public Server (VPS)

Once you’re there, click on the blue and icon at the correct of your screen. On succeeding page, opt for your VPSs location:

server location - How to Install WordPress on a Virtual non-public Server (VPS)

The server you select can rely on wherever you expect most of your traffic to return from. If your website in the main targets yanks users, as an example, you’ll need to travel with a US-based server. Next, scroll right down to the Server sort section and jump to the appliance tab. currently, search for the WordPress possibility at rock bottom and click on it:

application wordpress - How to Install WordPress on a Virtual non-public Server (VPS)

This will mechanically install WordPress on your VPS exploitation the newest 64-bit CentOS unleash as its OS (OS). There square measure alternative ‘distros’ out there to be used, however, CentOS is that the default selection for brand new Vultr VPSs due in the main to its stability.

If you scroll more down, you’ll opt for that arrange you wish to use for your VPS. Initially, we tend to suggest selecting the $5 per month plan:

server price - How to Install WordPress on a Virtual non-public Server (VPS)

This should be enough for one medium-sized WordPress website. a lot of significantly, you’ll invariably scale your VPS with a couple of clicks, however downgrading you arrange could be a heap a lot of difficult. Doing things this fashion offers you lots a lot of mobility.

Moving on, there are some of the fascinating choices below the extra options section. for instance, you’ll alter machine-controlled backups for an additional 2 hundredth of your base plan’s price, that works bent on $1 for this instance. Denial of Service (DDoS) protection, on the opposite hand, can run you an additional $10 per month:

additional features - How to Install WordPress on a Virtual non-public Server (VPS)

It’s up to you which one’s options you would like to alter, however, detain mind you’ll invariably beware of backups mistreatment plugins at no further price. Finally, attend very cheap of the screen and set a reputation for your VPS:

server hostname - How to Install WordPress on a Virtual non-public Server (VPS)

Whatever name you decide on is for internal identification solely, therefore choose something you would like. once you’re prepared, click on the Deploy currently button below. Once Vultr completes the installation, your new VPS is prepared to go! you’ll access its settings from the Servers tab:

server tab - How to Install WordPress on a Virtual non-public Server (VPS)

Within your VPS’s main settings screen, you’ll notice directions for the remainder of the setup process:

setup instructions - How to Install WordPress on a Virtual non-public Server (VPS)

By accessing the universal resource locator mistreatment the login details provided by Vultr, you’ll be ready to end putting in WordPress (which is comparable to the same old method):

wordpress installation - How to Install WordPress on a Virtual non-public Server (VPS)

When that’s done, you’ll use your new website for love or money you would like. simply bear in mind to purpose your domain towards your VPSs information processing address and you’ll be all set!

How to Install WordPress on a VPS Manually (In four Steps)

In case you’re employing a VPS that doesn’t embrace one-click setup choices for apps like WordPress, you’ll invariably take a manual install. For this instance, we’re aiming to do the complete setup on a fresh VPS running CentOS seven.

Step #1: hook up with Your VPS Via SSH

Once you’ve got a VPS up and running, you’ll want 2 things to follow these instructions:

Your server’s root secret, therefore, you’ll run the required commands.
A Secure Shell (SSH) shopper like Putty.

To access your VPS, you’ll get to install Putty and open the appliance. Once you are doing that, you’ll see a neighborhood wherever you’ll specify the destination you would like to attach to:

putty destination - How to Install WordPress on a Virtual non-public Server (VPS)

Now kind your VPSs information processing address at intervals the Host Name (or information processing Address) field, set the Port choice to twenty-two, opt for SSH below association kind, then open. A command window can appear, asking what user you would like to login as. Type root, then enter your secret once prompted:

putty password - How to Install WordPress on a Virtual non-public Server (VPS)

If you have typewritten your secret properly, your VPSs name ought to show, and that we will get all the way down to business!

Step #2: Install the software package you would like to Run WordPress

To run WordPress, you would like Associate in Nursing communications protocol server, a database, and PHP. For this tutorial, we’re aiming to install Apache, MariaDB, and therefore the latest version of PHP. luckily, you’ll do therefore in one fell swoop with one command:

sudo yum install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc unzip wget -y

This tells your server to transfer all of the required files and set them up. the method may take a couple of minutes looking at how briskly your server is, and once everything’s prepared, you’ll be ready to kind in additional commands.

Once the underlying software package is prepared, you would like to initialize it and tell your server also it up whenever. Here are the commands you’ll get to use:

sudo systemctl start httpd

sudo systemctl start mariadb

sudo systemctl enable httpd

sudo systemctl enable mariadb

At this stage, there’s just one step left to travel before you’ll install WordPress and begin mistreatment it, and that’s to set up your info.

Step #3: set up MariaDB and make a WordPress info

Before you’ll produce a info for your website, you would like to ‘secure’ your MariaDB installation, therefore, folks can’t access it remotely. to urge started, enter the subsequent command:

sudo mysql_secure_installation

Afterward, MariaDB can raise you for its root user secret, that ought to be blank, therefore simply hit the enter key. Then, you’ll be ready to set a brand new root secret. For the remainder of the settings, hit Y for all of the remaining four choices, significantly range 3, that disallows remote logins.

Now, login into your MariaDB account mistreatment the subsequent command, and detain mind you’ll get to enter the secret you set a flash ago:

mysql -u root -p

Once you’re in, there are four commands you would like to run successively. every line below is a personal command, therefore keep that in mind. Also, bear in mind to exchange the user and secret placeholders with a safer try to be used along with your database:


GRANT ALL PRIVILEGES on wordpress.* to ‘user’@’localhost’ identified by ‘password’;

DO 0;


There you go! Your new information is prepared to be used, therefore let’s not keep it waiting.

Step #4: Install and Run WordPress

Now we’ve setup our infrastructure, the ultimate step is to transfer the code, and install and set up it. Let’s kick things off with a fast series of commands to transfer the most recent version of the platform, extract its files, and move them to your root directory. detain mind every one of the lines below is a personal command you wish to run separately:


tar -xzvf latest.tar.gz

sudo cp -avr wordpress/* /var/www/html/

So far thus sensible. currently, let’s produce associate Uploads folder for your installation and assign the right permissions to your files and folders exploitation the subsequent 2 commands:

sudo mkdir /var/www/html/wp-content/uploads

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

sudo chmod -R 755 /var/www/html/

Finally, let’s rename your WordPress wp-config-sample.php file…

cd /var/www/html/

sudo mv wp-config-sample.php wp-config.php

sudo nano wp-config.php

…and configure it so it can connect to your database. The last command you ran will open the file using the nano editor within the command line. It’s a bit tricky to use, but just navigate the file using your keyboard arrows and replace the following fields with the same data you entered during step number three:


define(‘DB_NAME’, ‘wordpress’);

define(‘DB_USER’, ‘user’);

define(‘DB_PASSWORD’, ‘password’);

After updating those fields, type CTRL+O and CTRL+X on your keyboard. The former will save the changes you made to the file while the latter will close the nano editor. All that’s left to do now is to configure your VPS to allow HTTP and HTTPS connections, with these commands:

sudo firewall-cmd –permanent –zone=public –add-service=http

sudo firewall-cmd –permanent –zone=public –add-service=https

sudo firewall-cmd –reload

Once you run them, you’ll be able to access the WordPress installer by visiting your VPSs at http://yourvpsipgoeshere, commutation the placeholder consequently.

That’s it! we have a tendency to went through plenty of commands, however, the method itself is kind of straightforward once you understand it’s largely repetition, pasting, and following directions. With this guide, you’ll be able to install WordPress on any VPS you wish.


Using a VPS may be a huge jump if you’ve solely toughened shared hosting before. as luck would have it, most respected internet hosts keep the expertise straightforward. If you don’t wish to affect mistreatment the program line to customise your VPS, likelihood is that your supplier can have the tools to assist you.

With that in mind, there square measure 2 ways in which to travel regarding fitting WordPress on a VPS. Most VPS services offer you with one-click setup choices for standard platforms like WordPress otherwise you will do therefore manually. The latter technique needs you to be snug mistreatment the program line, however, it’s not tough if you recognize what steps to follow.

Add a Comment