How To Install WordPress On Contabo VPS (Without cPanel/Webmin) | Step-By-Step Guide

Our website contains links to affiliate websites, and we receive an affiliate commission for any purchase made from the affiliate website by clicking the links on our website. Learn More. Our reviews are not affected by participation in such programs.

This post will discuss the best ways to install WordPress on Contabo VPS with the app LAMP and without any requirement of cPanel & Webmin (since these panels will cost additional money). With this, you can save on cPanel & Webmin monthly pricing.

In short, once you’ve secured a domain name for your site, you’ll need to sign up with Contabo for a VPS hosting package. The next step will be to map your domain to the VPS server via your DNS records. When done, you should download an SSH client called Putty. Next, you’ll create a MySQL database and install a PHP extension. Finally, you’ll be able to download WordPress and configure Apache and your WordPress directory.

We will install WordPress CMS because this is the most popular CMS and is widely used by website designers and bloggers. So, let’s dive in.

What Is Contabo VPS (Virtual Private Server)?

As we know, WordPress is a CMS that falls into Web Applications, and web apps must be hosted publicly for people to visit the site.

Now, it is simple to host the Web App. You just have to upload the files and web database into the public server so everyone can access the files over the internet from anywhere.

Two Hosting Ways

This section looks at hosting the website files, including WordPress CMS. For that, we have two of the most affordable options:

Shared Hosting:

This type of hosting involves uploading the website on a server like Godaddy, Bluehost, or Namecheap EasyWp. The easy wp is called managed hosting, which uses a cloud server that is more secure than the shared ones.

These hosts are cheap because they host your site with hundreds of other websites on the same server, so your files coexist with the files of other websites.

This way, these hosting services are cheap, but at the same time, the website’s security is a concern, especially if it’s not kept intact.

VPS Hosting:

VPS hosting is called a Virtual Private Server. When you buy a VPS hosting service, you will get your own server to host your website separately, and your files will not coexist with other websites’ files. Hence it reduces the concern for security and malware.

Which Is Better Overall?

We will not discuss the in-depth technical comparison between the two hosting services, but we can assure you that VPS is the better option when it comes to security and website speed and management.

If you are building a website in 2022, then website speed is an essential factor from the perspective of customer experience, or if you are a blogger, search engines like Google prefer a fast website over a slow one.

You may think VPS services are expensive, right? Well, not exactly. Below we have an option of a VPS service which is much cheaper than some shared hosting services.

The Contabo VPS hosting service starts at 3.99 Euros per month, equivalent to most shared hosting services these days.

Ok, then, what’s the catch? The only catch here is you have to follow some technical guidelines to set up and configure your WordPress website.

Fortunately, that is what we covered here in a step-by-step guide, where you will have every step you need to set up your WordPress website completely.

How to Install WordPress on Contabo VPS

To install WordPress on Contabo VPS, follow every step in this guide and be patient during the process.

Now let’s get started!

#1. Domain Name

A domain name is a crucial part of building a website, and registering one is effortless. You can easily register a brand new domain name with Godaddy or get a .com domain from NameCheap.

See also  Contact Form 7 Vulnerable in over 5 million Sites

I would suggest you check out both the services for the best offer. You might save more money when you go through offers on the service.

However, if you already have a domain, you can always use that for building the website. Now let’s continue with the VPS configuration.

#2. Register VPS With Contabo

# Contabo Hosting Service

Navigate to the Contabo VPS pricing page. Once you reach the pricing page, you will see four plans curated for different machine configurations.

Choose the basic plan, which is the cheapest option. It will be good enough for starters. After some time, when your website grows, you can always have a more robust VPS service with higher machine resources, which helps handle visitors.

# Configure Your VPS

On the next page of the VPS, you will see the server configuration. Now in the “Initial Contract Period” option, you can select 12 months because it comes with no setup fees.

The region section is set to European Union by default, which is free, but if you want to change the area, you will have to pay more. I recommend you select European Union, which does not increase the price.

In the next section, you must select the “OS” and “Apps and Panel.”

For the OS, select Ubuntu 18.04, which is free to use.

For the “Apps and Panel,” select LAMP with Ubuntu 18.04, as shown in the screenshot.

Now scroll down and click on the “Next” button. You will be redirected to the billing page with the information appropriately listed so you can confirm your order.

In almost 24 hours, the Contabo team will set up the server for you and send the complete details via email. Keep this email secure because we will need this information to configure the website.

Now you have your server, and we can move on with the process by mapping the domain.

#3. Domain Mapping to the VPS

In the email, Contabo sent you your IP address, which will be used to access the VPS. You can easily access your VPS through your IP address and build a website with it, but visitors will not want to come to a website that does not have a domain name and uses the IP address as a domain.

Alright, we already have the domain name and our VPS, so we have to connect both to build a website.

To do that, we will simply map your domain name to your VPS IP address, so we can use both the domain name and IP address to access the WordPress website.

# Setting Up the DNS Records :

Open the DNS management in your domain registrar dashboard and edit the main “A record” as shown in the screenshot below:

  • Host: @
  • Points To: Your Server IP Address (Comes in the email)

And done, now click on the Save button.

#4. WordPress Installation on VPS Using Putty

Now that we mapped the domain with the server, it’s entirely ready for the WordPress installation process.

Firstly we have to connect our VPS to an SSH client like Putty. For that, follow below:

Download Putty from the above link and install it on your computer. After the installation, open the software, enter the Server IP name and press the Open button, as shown in the screenshot.

A CMD window will open, asking you to log in. Just enter “root” as the user, and then type the password sent to you by Contabo via Email.

Remember: When you type in the password in the CMD window, it will hide your password for security purposes. Just keep typing correctly, and it will work fine.

install WordPress on Contabo VPS

After the successful login, you will see the above details on your screen. Now follow the below steps to start the installation process.

See also  10 Hobbies For People Who Don't Like Sports

Step 1: Create the MySQL Database.

WordPress CMS uses the MySQL database to store files and manage information. The MySQL installation comes with the package, which is already installed as a LAMP Stack, but to use it, we have to create the database and a profile user for WordPress.

Firstly, login into your MySQL root administrative account by inserting the below command:

mysql -u root -p

This command will generate the root password. Copy and paste it and hit the “Enter” button.

Now, create an individual database that WordPress will use. You can name this according to your needs. In this example, we will call it “wordpress.” You can run the following command to create a WordPress database.

CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Always enter a semi-colon (;) at the end of every MySQL command.

Next step, we will create a separate MySQL user account that will be used separately to operate our newly created database. When we create one function database and user account, it helps in the management and the security of the website. We are going to name the user account “wordpressuser.” You can use whatever you want for the name.

We will create the account and set a strong password to provide access to the database. Copy and paste the following command, and always remember to set a strong password for the database user.

CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'Enter_Your_Password_Here';
GRANT ALL ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'enter_a_custom_password_here';

Now you have a database with the user account you created for WordPress. We need to provide the privileges so that the current instance of MySQL will know the recent changes, so run the following command.

FLUSH PRIVILEGES;

Now we will exit MySQL by entering the following command.

EXIT;

Congratulations, you have completed the process.

Step 2. Install PHP Extension

We will leverage some additional PHP extensions to run the WordPress CMS efficiently with plugins.

You can automatically download and install the required PHP extension for WordPress by entering the following command.

sudo apt update

Enter this now.

sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

We will restart the Apache webserver to load these new extensions in the next part. And if you are installing the additional plugins, you can always restart Apache now by typing the following command:

sudo systemctl restart apache2

Step 3. Download WordPress

Since we have configured our server software, we can now download and set up the WordPress CMS. Always download the latest version of WordPress for security patches and compatibility with the plugins.

Run the following command to change the directory to /Html.

cd /var/www/html

To download the WordPress file, enter:

curl -O https://wordpress.org/latest.tar.gz

Now the file we download is compressed, and we have to extract it to create the WordPress directory system.

tar xzvf latest.tar.gz

Once we have downloaded WordPress and our server is fully configured and set up, we need to connect things.

Now we have some minor steps to follow, which can be understood easily with the short video we attached below. The guide includes all the commands in the video, so you can easily copy and paste them. Just follow the video.

Credit: H-educate

Step 4. Adjustment for Apache’s Configuration

Now we need to configure Apache to access the website by the domain name. To configure it, open the WinSCP again and go to this directory: /etc/apache2/sites-available/

Next, create a new empty file and name it “domain.conf” (Here: Change the “domain” to your domain name)

See also  Instantly Build Your WordPress Website With Hostinger Hosting!

Open the domain.conf and then simply copy & paste the below content in the file and save it.

<VirtualHost *:80>
     ServerAdmin [email protected]domain

     DocumentRoot /home/crazyfor/domains/searchinventure.com/public_html/
     ServerName domain

     ServerAlias domain

     <Directory /home/crazyfor/domains/searchinventure.com/public_html/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>
     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Note: Remember to change “domain” to your domain name in the above code.

#5. Finish Configuration for Apache & Restart the Service

Run the following commands to finish the configuration:

sudo a2ensite domain.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service 

Done!

#6. WordPress Directory Configuration

Finally, we are going to finish the configuration and installation of WordPress. We will arrange some items in our WordPress directory first.

#. Setting Up Ownership And File Permissions

Now that we have worked through so many steps, the one thing that we need to set up is specific file permissions and ownership.

The first thing will be setting up ownership of the files to the www-data user and group. Give permission to this user because this will run as an Apache web server, and most importantly, Apache should be able to read and write WordPress files for the website to work and perform proper updates.

Update and change the ownership with Chown :

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

In the next step, we will use the following find commands to set up the required permissions for the WordPress directories and files:

sudo find /home/crazyfor/domains/searchinventure.com/public_html/ -type d -exec chmod 750 {} \;
sudo find /home/crazyfor/domains/searchinventure.com/public_html/ -type f -exec chmod 640 {} \;

#. Setting Up WordPress Configuration

In this section, we will need to make a few modifications to the main configuration file of WordPress: the wp-config file mentioned in the above video.

After opening the file, you first want to prepare some secret keys so that you will have more security in our installation. WordPress automatically provides a secure key generator for these types of values so that you don’t have to come up with some complex keys on your own.

These keys will only be for internal use, so using such a complex key is not a problem. It is just for security purposes. Now grab the secure value from the secret key generator and type in Putty:

curl -s https://api.wordpress.org/secret-key/1.1/salt/

You will get some unique values that look like the below keys:

Outputdefine('AUTH_KEY',         '1jl/vqfs<XhdXoAPz9 DO NOT COPY THESE VALUES c_j{iwqD^<+c9.k<[email protected]');
define('SECURE_AUTH_KEY',  'E2N-h2]Dcvp+aS/p7X DO NOT COPY THESE VALUES {Ka(f;rv?Pxf})CgLi-3');
define('LOGGED_IN_KEY',    'W(50,{W^,OPB%PB<JF DO NOT COPY THESE VALUES 2;y&,2m%3]R6DUth[;88');
define('NONCE_KEY',        'll,4UC)7ua+8<!4VM+ DO NOT COPY THESE VALUES #`DXF+[$atzM7 o^-C7g');
define('AUTH_SALT',        'koMrurzOA+|L_lG}kf DO NOT COPY THESE VALUES  07VC*Lj*lD&?3w!BT#-');
define('SECURE_AUTH_SALT', 'p32*p,]z%LZ+pAu:VY DO NOT COPY THESE VALUES C-?y+K0DK_+F|0h{!_xY');
define('LOGGED_IN_SALT',   'i^/G2W7!-1H2OQ+t$3 DO NOT COPY THESE VALUES t6**bRVFSD[Hi])-qS`|');
define('NONCE_SALT',       'Q6]U:K?j4L%Z]}h^q7 DO NOT COPY THESE VALUES 1% ^qUswWgn+6&xqHN&%');

We can directly paste the above configuration lines into the configuration files to set the secure keys. Simply copy the output you received.

Now just open the WordPress configuration file with WinSCP and replace these lines shown in the above image.

Step 7. Finalizing the Installation With the Web Interface

The server configuration is complete, and now it is time to complete the installation of WordPress through the web interface.

In the web browser, enter the server’s domain name or public IP address:

http://server_domain

Now choose your preferred language in the WordPress language select window.

Congratulations! You have successfully installed WordPress CMS in your Contabo VPS!

Conclusion

Installing WordPress via Contabo VPS hosting without using cPanel or Webmin may seem complex. While there are many steps in the process, our step-by-step guide simplifies everything making it easier to comprehend. Before you know it, you’ll know how to install WordPress on Contabo VPS and have your site up and running.

Leave a Comment