How to Install WordPress on a Virtual Private Server (VPS) (2024)

The first time you sign up for a hosting plan can be very confusing. There’s shared hosting, a dedicated server, managed services, and even Virtual Private Server (VPS) hosting to choose from. There are a lot of options to take in, and the problem lies in knowing which type of plan you really need.

VPSs are a natural progression from shared hosting, but the name makes them sound overly complicated. In this article, we’re going to give you a full breakdown of what a VPS is and when you should consider using one. Then, we’ll teach you how to install WordPress a VPS in four simple steps. Let’s get to it!

Table Of Contents

  • 1What a VPS Is (And When You Should Consider Upgrading to One)
  • 2How to Install WordPress on a VPS Using Your Hosting Control Panel
  • 3How to Install WordPress on a VPS Manually (In 4 Steps)
    • 3.1Step #1: Connect to Your VPS Via SSH
    • 3.2Step #2: Install the Software You Need to Run WordPress
    • 3.3Step #3: Configure MariaDB and Create a WordPress Database
    • 3.4Step #4: Install and Run WordPress
  • 4Conclusion

What a VPS Is (And When You Should Consider Upgrading to One)

With shared hosting, you occupy the same server as other users do. This means you share resources with everyone else, which often leads to performance issues if your website requires a bit more juice. In contrast, a VPS enables you to still share a single physical server, but you get a virtual instance to host your website. Let’s break down why this is good news for you:

  • You get a set amount of resources.When you sign up for a VPS, you get a set amount of memory, storage, and bandwidth, and you don’t need to share those resources with anyone else.
  • They are easy to upgrade.In most cases, you can ask your hosting provider to add more resources to your VPS at a moment’s notice.
  • You get full control over your server.Even though you’re dealing with a virtual server, you still get full control over it.
  • They’re often reasonably priced.To be more specific, you can easily find powerful starter VPS plans at below $10 per month.

In our opinion, once your WordPress website outgrows shared hosting, you have two options when it comes to upgrading. You can either sign up for a VPS plan, or alternatively try managed WordPress hosting.

As you may know, managed WordPress hosting plans are all about convenience. However, when it comes to performance, you can probably do just as well if not better with a VPS. The only difference is, a VPS has a longer learning curveifyou decide to set it up manually. This means configuring your server, tweaking it to run WordPress, and installing the platform itself. We’ll cover how to do this later.

How to Install WordPress on a VPS Using Your Hosting Control Panel

There are a lot of great options when it comes to WordPress-friendly VPS services. However, we’re partial to Vultr thanks to its accessible prices and excellent performance. You’re free to choose any provider you want to host your website, but for this tutorial, we’re going to use Vultr as an example. You may need to check whether your host will let you set up a VPS through your account dashboard. If not, you’ll want to skip to the next section, where we talk about how to install WordPress manually via the command line.

Assuming you’ve already signed up for a Vultr account, your next step will be to log into it and go to theServerstab on your dashboard:

How to Install WordPress on a Virtual Private Server (VPS) (1)

Once you’re there, click on the blue Plus icon at the right of your screen. On the next page, choose your VPSs location:

How to Install WordPress on a Virtual Private Server (VPS) (2)

The server you choose will depend on where you expect most of your traffic to come from. If your website mainly targets American users, for example, you’ll want to go with a US-based server. Next, scroll down to theServer Typesection and jump to theApplicationtab. Now look for the WordPress option at the bottom and click on it:

How to Install WordPress on a Virtual Private Server (VPS) (3)

This will automatically install WordPress on your VPS using the latest 64-bit CentOS release as its Operating System (OS). There are other ‘distros’ available for use, but CentOS is the default choice for new Vultr VPSs due mainly to its stability.

If you scroll further down, you can choose which plan you want to use for your VPS. Initially, we recommend choosing the $5 per month plan:

How to Install WordPress on a Virtual Private Server (VPS) (4)

This should be enough for a single medium-sized WordPress website. More importantly, you can always scale your VPS with a few clicks, but downgrading your plan is a lot more complicated. Doing things this way gives you a lot more maneuverability.

Moving on, there are a couple of interesting options under theAdditional Featuressection. For example, you can enable automated backups for an extra 20% of your base plan’s cost, which works out to $1 for this example. Denial of Service (DDoS) protection, on the other hand, will run you an extra $10 per month:

How to Install WordPress on a Virtual Private Server (VPS) (5)

It’s up to you which features you want to enable, but keep in mind you can always take care of backups using plugins at no extra cost. Finally, go to the bottom of the screen and set a name for your VPS:

How to Install WordPress on a Virtual Private Server (VPS) (6)

Whatever name you choose is for internal identification only, so pick anything you want. When you’re ready, click on theDeploy Nowbutton below. Once Vultr completes the installation, your new VPS is ready to go! You can access its settings from theServerstab:

How to Install WordPress on a Virtual Private Server (VPS) (7)

Within your VPS’s main settings screen, you’ll find instructions for the rest of the setup process:

How to Install WordPress on a Virtual Private Server (VPS) (8)

By accessing the URL using the login details provided by Vultr, you’ll be able to finish installing WordPress (which is similar to the usual method):

How to Install WordPress on a Virtual Private Server (VPS) (9)

When that’s done, you can use your new website for anything you want. Just remember to point your domain towards your VPSs IP address and you’ll be all set!

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

In case you’re using a VPS that doesn’t include one-click setup options for apps such as WordPress, you can always opt for a manual install. For this example, we’re going to do the entire setup on a brand new VPS running CentOS 7.

Step #1: Connect to Your VPS Via SSH

Once you have a VPS up and running, you’ll need two things to follow these instructions:

  1. Your server’srootpassword so you can run the necessary commands.
  2. A Secure Shell (SSH) client such as Putty.

To access your VPS, you’ll need to install Putty and open the application. Once you do that, you’ll see a section where you can specify the destination you want to connect to:

How to Install WordPress on a Virtual Private Server (VPS) (10)

Now type your VPSs IP address within theHost Name (or IP Address)field, set thePortoption to 22, chooseSSHunderConnection type, then clickOpen. A command window will pop up, asking what user you want to login as. Typeroot,then enter your password when prompted:

How to Install WordPress on a Virtual Private Server (VPS) (11)

If you typed your password correctly, your VPSs name should display, and we can get down to business!

Step #2: Install the Software You Need to Run WordPress

To run WordPress, you need an HTTP server, a database, and PHP. For this tutorial, we’re going to install Apache, MariaDB, and the latest version of PHP. Fortunately, you can do so in one fell swoop with a single 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 download all of the necessary files and set them up. The process might take a few minutes depending on how fast your server is, and when everything’s ready, you’ll be able to type in more commands.

Once the underlying software is ready, you need to initialize it and tell your server to boot it up every time. Here are the commands you’ll need to use:

sudo systemctl start httpdsudo systemctl start mariadbsudo systemctl enable httpdsudo systemctl enable mariadb

At this stage, there’s only one step left to go before you can install WordPress and start using it, and that’s to configure your database.

Step #3: Configure MariaDB and Create a WordPress Database

Before you can create a database for your website, you need to ‘secure’ your MariaDB installation so people can’t access it remotely. To get started, enter the following command:

sudo mysql_secure_installation

Afterward, MariaDB will ask you for itsrootuser password, which should be blank, so just hit the enter key. Then, you’ll be able to set a newrootpassword. For the rest of the settings, hitYfor all of the remaining four options, particularly number three, which disallows remote logins.

Now, login into your MariaDB account using the following command, and keep in mind you’ll need to enter the password you set a moment ago:

mysql -u root -p

Once you’re in, there are four commands you need to run in turn. Each line below is an individual command, so keep that in mind. Also, remember to replace theuserandpasswordplaceholders with a more secure pair for use with your database:

CREATE DATABASE wordpress;GRANT ALL PRIVILEGES on wordpress.* to 'user'@'localhost' identified by 'password';FLUSH PRIVILEGES;exit

There you go! Your new database is ready for use, so let’s not keep it waiting.

Step #4: Install and Run WordPress

Now we have setup our infrastructure, the final step is to download the software, and install and configure it. Let’s kick things off with a quick series of commands to download the latest version of the platform, extract its files, and move them to yourrootdirectory. Keep in mind each of the lines below is an individual command you need to run separately:

wget http://wordpress.org/latest.tar.gztar -xzvf latest.tar.gzsudo cp -avr wordpress/* /var/www/html/

So far so good. Now let’s create anUploadsfolder for your installation and assign the correct permissions to your files and folders using the following two commands:

sudo mkdir /var/www/html/wp-content/uploadssudo chown -R apache:apache /var/www/html/sudo chmod -R 755 /var/www/html/

Finally, let’s rename your WordPresswp-config-sample.phpfile…

cd /var/www/html/sudo mv wp-config-sample.php <a class="wpil_keyword_link" href="https://www.elegantthemes.com/blog/tips-tricks/wordpress-wp-config-php" title="wp-config.php" data-wpil-keyword-link="linked">wp-config.php</a>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, typeCTRL+OandCTRL+Xon your keyboard. The former will save the changes you made to the file while the latter will close the nanoeditor. 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=httpsudo firewall-cmd --permanent --zone=public --add-service=httpssudo firewall-cmd --reload

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

That’s it! We went through alotof commands, but the process itself is quite simple when you realize it’s mostly copying, pasting, and following instructions. With this guide, you’ll be able to install WordPress on any VPS you want.

Conclusion

Using a VPS is a big jump if you’ve only experienced shared hosting before. Fortunately, most reputable web hosts keep the experience simple. If you don’t want to deal with using the command line to customize your VPS, chances are your provider will have the tools to help you.

With that in mind, there are two ways to go about setting up WordPress on a VPS. Most VPS services provide you with one-click setup options for popular platforms such as WordPress or you can do so manually. The latter method requires you to be comfortable using the command line, but it’s not difficult if you know what steps to follow.

Do you have any questions about install WordPress on a VPS? Ask away in the comments section below!

Article thumbnail image by Aa Amie / shutterstock.com.

How to Install WordPress on a Virtual Private Server (VPS) (2024)
Top Articles
2024 Ram 1500 Classic Capability | HEMI® Engines & More
Complete SpyBubble Pro Review — Is It Legit?
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 6049

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.