How To Install WordPress On Contabo VPS (Without cPanel/Webmin) – Steps By Steps

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.

In this post, we will discuss the process of installing the latest WordPress CMS on the 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.

We will install WordPress CMS because this is the most popular CMS and is widely used by website designers and bloggers.

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

In this section, we look 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 hosting. 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 important 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 a lot cheaper than some shared hosting services.

Contabo VPS service starts at 3.99 Euros per month which is equivalent to most of the 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 the CMS on Contabo VPS, follow every step shown in this guide with precision and be patient during the process.

Now let’s get started!

#1. Domain Name

A domain name is a really important part of building a website, and it’s very simple to register one. You can easily register a brand new domain name with Godaddy, or you can get a .com domain from NameCheap.

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. Now once you reach the pricing page, you will see four plans that are 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 powerful 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 will have to select the “OS” and “Apps and Panel.”

For the OS, select Ubuntu 18.04, which is completely 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 listed properly 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 we got our VPS, so we have to connect both of them in order to build a website.

So 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 completely 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, and it will ask 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

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

Step 1: Create the MySQL Database.

WordPress CMS uses the MySQL database to store files and manage the 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 in order 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

To run the WordPress CMS efficiently with plugins, we will leverage some additional PHP extensions.

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

To load these new extensions, we will restart the Apache webserver 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 the 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 the Apache in order to access the website by the domain name. To configure it, open the WinSCP again and just go to this directory: /etc/apache2/sites-available/

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

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 in order 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, the first thing that you want to do is 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 it is not a problem to use such a complex key. 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 simply 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!

Leave a Comment