How to Self-Host WordPress on Contabo (2026 Guide)
Self-hosting WordPress on a Virtual Private Server (VPS) is an excellent way for developers and homelab enthusiasts to maintain full control over their web environment. In this guide, weโll detail how to install WordPress on Contabo, offering you a cost-effective option starting at just 5.99 EUR/month.
Why Choose Contabo?
Contabo is an ideal choice for self-hosting due to its competitive pricing, robust features, and exceptional performance. Below is a quick comparison of some top VPS providers based on pricing and features.
| Provider | Price/Month | CPU Cores | RAM | Storage |
|---|---|---|---|---|
| Contabo VPS | 5.99 EUR | 2 | 4 GB | 200 GB SSD |
| Hetzner Cloud | 4.15 EUR | 1 | 2 GB | 20 GB SSD |
| DigitalOcean | 6 USD | 1 | 2 GB | 25 GB SSD |
| Vultr | 6 USD | 1 | 2 GB | 25 GB SSD |
| Linode | 5 USD | 1 | 2 GB | 25 GB SSD |
For a full VPS comparison, check out our best VPS comparison.
Prerequisites
Before proceeding, make sure you have the following:
- Contabo Account: Sign up for a VPS plan at Contabo.
- Domain Name: Register a domain name if you want to use one.
- SSH Client: Use tools like PuTTY (for Windows) or Terminal (for macOS/Linux) to access your VPS.
Step 1: Create and Configure Your VPS
- Log in to your Contabo account.
- Select โCreate VPSโ and choose your desired configuration.
- Choose an operating system. Ubuntu 20.04 LTS is recommended for WordPress.
- Complete the payment process, and you will receive your VPS credentials via email.
Step 2: Access Your VPS via SSH
- Open your SSH client.
- Connect to your VPS using the command:
ssh root@your_vps_ip_address - Enter your root password when prompted.
Step 3: Update Packages and Install Required Software
Once youโve accessed your VPS, itโs crucial to update your packages:
apt update && apt upgrade -y
Now, install the necessary software. WordPress requires a web server, database server, and PHP. We will use Apache, MySQL, and PHP.
apt install apache2 mysql-server php libapache2-mod-php php-mysql -y
Step 4: Secure MySQL
Itโs essential to secure your MySQL installation:
mysql_secure_installation
Follow the prompts to set a root password and remove anonymous users.
Step 5: Create a MySQL Database for WordPress
Login to MySQL:
mysql -u root -p
Then run the following commands to create your WordPress database and user:
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 6: Download and Configure WordPress
Navigate to the web directory:
cd /var/www/html
Download WordPress:
wget https://wordpress.org/latest.tar.gz
tar -xvf latest.tar.gz
mv wordpress/* ./
rmdir wordpress
Now configure the wp-config.php file:
cp wp-config-sample.php wp-config.php
nano wp-config.php
Update the database section:
define('DB_NAME', 'wordpress');
define('DB_USER', 'wpuser');
define('DB_PASSWORD', 'your_secure_password');
Save and exit the editor.
Step 7: Set Directory Permissions
Adjust directory permissions for WordPress:
chown -R www-data:www-data /var/www/html
chmod -R 755 /var/www/html
Step 8: Enable the Apache Rewrite Module
For WordPress permalinks to work, you must enable the rewrite module:
a2enmod rewrite
systemctl restart apache2
Step 9: Complete the WordPress Installation via Browser
Open your web browser and navigate to your VPS IP address or domain (http://your_vps_ip). You will see the WordPress installation wizard. Choose your desired language and follow the prompts to complete the installation.
Frequently Asked Questions
1. Can I use Contabo for other applications besides WordPress?
Absolutely! Contabo provides a versatile platform for various applications, including Nextcloud, Joomla, and many others. Its strong performance and competitive pricing make it an excellent choice for media servers, game servers, or any other application you want to self-host.
2. Is WordPress on Contabo suitable for high-traffic sites?
Yes, Contaboโs VPS plans can handle moderate to high traffic effectively. However, for very high-traffic sites, consider scaling up your resources (more CPU, RAM, and storage) or optimize your WordPress installation with caching plugins and CDN services.
3. How can I secure my WordPress installation?
To secure your site, start by keeping WordPress, plugins, and themes updated. Implement SSL by installing Letโs Encrypt with the command sudo apt install certbot python3-certbot-apache. Additionally, use security plugins such as Wordfence and maintain regular backups to protect against data loss.
By following this guide, you can successfully install WordPress on Contabo and take control of your web hosting environment. Happy self-hosting!