How To Install WordPress on Contabo VPS (WITHOUT cPanel)

install wordpress on contabo

In this Guide, I will show you how to Install WordPress on Contabo VPS server with LAMP without using cPanel or Webmin. In this way, you can save cPanel monthly costs and Webmin Resources that are not required.

WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites.

Why and What is Contabo VPS?

Since WordPress is a Web Application, then obviously it must be hosted somewhere publicly. What do we mean by hosting?

Hosting a website or a web application simply means uploading the files and database into a public server so it can be accessibly Online over the internet.

Install WordPress on Contabo

Hosting Options.

Now when you want to host a web application (WordPress in our scenario), you have mainly 2 options:

Shared Hosting:

Which means publishing your website on hosting services like Godaddy, Bluehost, Hostinger… where your website will be hosted with hundreds of other websites on the same server.

VPS Hosting

In this setup, you will host your website on your own server, so you will have a server only for you! which is called a VPS or a Virtual Private Server.

Which one is better?

I don't want to go in depth now and explain technical stuff, but in few works, VPS is Definitely better where you will have your own server with full manageability and better performance.

And if you think that shred hosting is a lot cheaper, then you are wrong, as with Contabo VPS services you can start with a 3.99 € per month Only which is the same pricing for almost 90% of shared hosting services.

Maybe the only drawback here, is that it requires some more technical skills to set up and configure, but fortunately, you are here in the step-by-step guide, where you will see how things will go really easy!

Install WordPress on Contabo: Let's Start!

So now we are ready to Install WordPress on Contabo VPS.

Just one tiny note: there are a lot of VPS companies other than Contabo, and I already created tutorials on how to install WordPress on. example Digital Ocean.

You can check the Full Tutorial here.

Anyway, Let's Start our work!

Get a Domain Name.

Getting a Domain is as simple as eating a piece of chocolate cake. you need to go to any Domain registrar company like Godaddy, Enom, Freenom, Namecheap…. and Buy a Domain Name, you can even get one for 1$ per year.

I do recommend to get a .com domain that reflects your business. and if you already have one, as I think so, you can just skip this, and continue to get a VPS Server.

Watch this 3 Minutes Video and see how to get and buy a domain name from Godaddy:

This video is part of my Top Rated Course On Udemy:
Build Your Own SMTP and Send Unlimited Emails

Get a VPS Server From Contabo.

1: Open Contabo Website.

Open your web browser and navigate to Contabo VPS Page.

Install WordPress on Contabo VPS

You will see multiple VPS configuration to start with. You can simply start with the cheapest option to Install WordPress, it will be more than enough.

Later on, when you grow your business, you can scale up and get a more powerful VPS with Higher resources.

2: Set VPS Options

On the Next Page, you will need to select some options

In the Operating System Option, Select Ubuntu 18.04

Install WordPress on Contabo VPS Ubuntu
Select Ubuntu 18.04

Then in the Administration Panel, Select LAMP

Install WordPress on Contabo VPS LAMP

And last option, In the Addons, check “Individual reverse DNS”

Install WordPress on Contabo VPS

If you were promoted to enter the PTR record, enter your domain name, and That's it.

Now, Just Continue to the billing page, and confirm your order. I think other steps are simple and self explanatory.

In like 24 hours, Contabo Team will setup the Server and send the details to your email like this:

Install WordPress on Contabo VPS
Login Info

Great! You Got Your Server. ✔️

Map Domain Name to your VPS Server.

Ok Friend, Now we have a Domain and a VPS Server. But they are not connected!

Your VPS Server can be accessed now through the IP address that Contabo Team sent you by email. but of course, we don't want to access our WordPress website though an IP! we want to use our domain name.

So simply, we are going to map the domain name to our VPS IP, so then we access the VPS and the WordPress website through both the domain and the IP.

Configure your DNS Records:

Simply open DNS management zone in your Domain Provider (Godaddy in my case) and edit the main  A record like this:

host: @ points: YOUR SERVER IP.

map domain to vps

Done? Great! ✔️

Install WordPress on VPS.

Now our server is ready for the installation! You see, it's not that complicated????

Let's Connect to our server to start our work.

Connect to your VPS server using any SSH client like putty. and Let's start!

Just open Putty and enter the Server IP or Name, and Press Open.

It will ask you to login, just enter “root” as the user, then enter your password which is sent to you by email.

Note: while typing the password, putty will now show it for security reasons, but It's there, just type it!

install wordpress on contabo
Login with putty

And you are In! ✔️

Step 1 – Creating a MySQL Database and User for WordPress

WordPress uses MySQL to manage and store site and user information. We have MySQL installed already as part of the LAMP Stack, but we need to make a database and a user for WordPress to use.

To get started, log into the MySQL root (administrative) account by issuing this command:

mysql -u root -p

You will be prompted for the root password, just write or paste it and press Enter.

First, create a separate database that WordPress will control. You can call this whatever you would like, but we will be using wordpress in this guide to keep it simple. Create the database for WordPress by running this command:


Note: Every MySQL statement must end in a semi-colon (;)

Next, we are going to create a separate MySQL user account that we will use exclusively to operate on our new database. Creating one-function databases and accounts is a good idea from a management and security standpoint. We will use the name wordpressuser in this guide. Feel free to change this if you’d like.

We are going to create this account, set a password, and grant access to the database we created. We can do this by typing the following command. Remember to choose a strong password here for your 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';

You now have a database and user account, each made specifically for WordPress. We need to flush the privileges so that the current instance of MySQL knows about the recent changes we’ve made:


Exit out of MySQL by typing:


Done! ✔️

Step 2 – Installing Additional PHP Extensions.

WordPress and many of its plugins leverage additional PHP extensions.

We can download and install some of the most popular PHP extensions for use with WordPress by typing:

sudo apt update


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

We will restart the Apache web service to load these new extensions in the next section. If you are returning here to install additional plugins, you can restart Apache now by typing:

sudo systemctl restart apache2

Step 4 – Downloading WordPress

Now that our server software is configured, we can download and set up WordPress. For security reasons, in particular, it is always recommended to get the latest version of WordPress from their site.

change the current directory to /html by running the following command:

cd /var/www/html

The Download WordPress Files:

curl -O

Extract the compressed file to create the WordPress directory structure:

tar xzvf latest.tar.gz

So now we have WordPress Downlaoded, our server is configured, we need to attach thins together.

Since here there are some several tiny tasks to do, I felt that it's better to show you this in a small video, and all commands used in the video will be attached here in the guide, so please just follow up!

Check Also: How to host a PHP script online in 10 minutes? example: Xerochat from Codecanyon

Step 5 – Adjusting Apache’s Configuration

Well Done, Now WordPress is installed, we just need to configure apache so we can access our website using our domain name. To do so, open WinSCP (mentioned in the video) again and navigate to this directory: /etc/apache2/sites-available/

Now, create a new empty file and name it “domain.conf” (Change “domain” to your domain)

Open domain.conf Then copy and paste the content below into the file and save.

<VirtualHost *:80>
     ServerAdmin admin@domain
     DocumentRoot /var/www/html/
     ServerName domain
     ServerAlias domain

     <Directory /var/www/html/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined


IMPORTANT: replace “domain” with your domain

Enable configuration in apache and restart the service.

Now simply, run the following commands to finish the setup:

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

GREAT! You are almost done ????

Step 6 – Configuring the WordPress Directory

Before we open WordPress in browser and finish the installation, we need to adjust some items in our WordPress directory.

Adjusting the Ownership and Permissions

One of the big things we need to accomplish is setting up reasonable file permissions and ownership.

We’ll start by giving ownership of all the files to the www-data user and group. This is the user that the Apache webserver runs as, and Apache will need to be able to read and write WordPress files in order to serve the website and perform automatic updates.

Update the ownership with chown:

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

Next we will run two find commands to set the correct permissions on the WordPress directories and files:

sudo find /var/www/html/ -type d -exec chmod 750 {} \;
sudo find /var/www/html/ -type f -exec chmod 640 {} \;

These should be reasonable permission set to start with. Some plugins and procedures might require additional tweaks.

Setting up the WordPress Configuration File

Now, we need to make some changes to the main WordPress configuration file (wp-config mentioned in the video above)

When we open the file, our first order of business will be to adjust some secret keys to provide some security for our installation. WordPress provides a secure generator for these values so that you do not have to try to come up with good values on your own. These are only used internally, so it won’t hurt usability to have complex, secure values here.

To grab secure values from the WordPress secret key generator, type in putty:

curl -s

You will get back unique values that look something like this:

Outputdefine('AUTH_KEY',         '1jl/vqfs<XhdXoAPz9 DO NOT COPY THESE VALUES c_j{iwqD^<+c9.k<J@4H');
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&%');

These are configuration lines that we can paste directly in our configuration file to set secure keys. Copy the output you received now.

Now, open the WordPress configuration file with WinSCP and replace the lines like in the image below:

install wordpress on contabo

Step 7 (last step)– Completing the Installation Through the Web Interface.

Now that the server configuration is complete, we can complete the installation through the web interface.

In your web browser, navigate to your server’s domain name or public IP address:


Select the language you would like to use:

install wordpress on contabo

Great! This is WordPress Installed and ready on Your Contabo VPS!

Feel free to ask any question in the comments section.

Related Articles


Your email address will not be published. Required fields are marked *

        1. Hi Mahmoud,

          You just have to create any new virtual server with any new domain name.

          Just take care to fit correctly the DNS records in your other domain name provider.

          Kind regards,

          JB Erceau

  1. Well done Hassan,

    This Is a very detailed post and i like the way you structure the content for easy readability.

    However, I’m seeing this from another angle and i want to ask a question regarding that.

    1. Don’t you think this will be more easier to do with webmin than Lamp

    2. Or better still, will Installing webmin + Lamp while creating the server be more effective as the feature on webmin will only require few clicks on few buttons to create the databases, the password e.t.c.

    3. You mentioned this “Webmin Resources that are not required”.

    What are those resources?

    And does those requirement have an effect on the health of the wordpress site to be created.

    I look forward to your answer.

    Thanks for the values shared so far????

    1. Hi friend, Good Question, When you install webmin, it will use a lot more resources (ram and CPU) than installing lamp alone. because a lot of apps and services will be installed with webmin, that’s the idea, of course, if you are using a good VPS, you can go with webmin as I explained in my full premium course here:

  2. Thank you so much for this tutorial! I’ve tried a lot of the other ones out there and they don’t work. The only problem I have is with https. I can only access the site with http.

  3. when i write “mysql -u root -p”
    Command ‘mysql’ not found, but can be installed with:

    apt install mysql-client-core-5.7
    apt install mariadb-client-core-10.1

  4. Hello Hassan

    I just wana ask that Can we use cloud Hosting with a company instead of VPN hosting ? and use wordpress instead of PHP for script ??? Please advice as i am new into this .Highly appreciate .I mean If we buy cloud Hosting with wordpress website and want to use script into my new website is that possible >If Yes what are the steps please guide …

    Thanks n Regards

  5. Hello Hassan,
    Thank you for the good content. I have one question. I need to install wp only in a subfolder of my main site. I will follow your instructions from this article, I just have to download wp in the subfolder and change the comands where it says domain with domain/subfolder, right?
    Thanks and Regards

  6. hi
    thank your first for your information but can you help me with the step 5
    i dont know how to do navigation , please can you explain it simpler all step five i have problem with ,can i have your email if i need anything further. thanks a lot

  7. Hello Sir. Please the all in one video downloader PHP script from code canyon is different. So please could you do a new tutorial on how to install it. I started using your tutorials but I’m stuck and don’t know what to do.

  8. Hassan, i made my webiste on contabo vps according to your instructions but when i open my webite and logged into my wordpress admin account, when i was about to press installed button it gave me the error 500 saying that the page is unable to handle the request and now if i open my webiste it gives me the same error