Install WordPress on a Free VPS

If you want to host a website for free, installing WordPress on a free VPS is the best way to get full control without paying for shared hosting.
The good news? You can do this on any free VPS from Oracle Cloud, Google Cloud, or from the providers listed on GratisVPS.net.

This step-by-step guide shows you exactly how to install WordPress on a free VPS — even if you’ve never used Linux before.


1. Choose Your Free VPS

You can use any free VPS from:

  • Oracle Cloud Free Tier

  • Google Cloud free region

  • Community VPS programs

  • Verified free VPS providers

👉Get a free VPS here: https://gratisvps.net/

For the tutorial, we will use Ubuntu 22.04, but any Linux distro works.


2. Connect to Your VPS via SSH

If you’re on Windows, use PuTTY.
On macOS/Linux, use Terminal.

Run:

ssh root@your-server-ip

If it asks “Are you sure you want to continue?”, type yes and press Enter.


3. Update Your Server

This ensures everything is up to date.

apt update && apt upgrade -y

4. Install LAMP Stack (Linux, Apache, MySQL, PHP)

Install Apache

apt install apache2 -y

Check status:

systemctl status apache2

Install MySQL

apt install mysql-server -y

Secure it:

mysql_secure_installation

Install PHP + Modules

apt install php php-mysql php-curl php-xml php-gd php-mbstring php-zip -y

Restart Apache:

systemctl restart apache2

5. Create a MySQL Database for WordPress

Login to MySQL:

mysql

Inside MySQL, create database & user:

CREATE DATABASE wpdata;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON wpdata.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

6. Download WordPress

Move to the web directory:

cd /var/www/html

Delete the default file:

rm index.html

Download WordPress:

wget https://wordpress.org/latest.tar.gz
tar -xvf latest.tar.gz
mv wordpress/* .
rm -rf wordpress latest.tar.gz

7. Configure WordPress

Copy sample config:

cp wp-config-sample.php wp-config.php

Edit it:

nano wp-config.php

Update these lines:

define( 'DB_NAME', 'wpdata' );
define( 'DB_USER', 'wpuser' );
define( 'DB_PASSWORD', 'StrongPasswordHere' );
define( 'DB_HOST', 'localhost' );

Save with:
CTRL + X, then Y, then ENTER


8. Fix Permissions

chown -R www-data:www-data /var/www/html
chmod -R 755 /var/www/html

9. Access WordPress in Your Browser

Go to:

http://your-server-ip

You will see the WordPress installation screen.
Choose your language → enter site details → create admin user.

Congratulations — WordPress is now running on your free VPS!


10. (Optional) Install HTTPS for Free with Let’s Encrypt

If you have a domain, install free SSL:

apt install certbot python3-certbot-apache -y
certbot --apache

Follow the instructions to secure your site with HTTPS.


🎉 Your WordPress Site Is Now Live — For Free

You’ve installed WordPress on a free VPS using:

✔ Free Linux VPS
✔ Apache
✔ MySQL
✔ PHP
✔ Free SSL
✔ Zero hosting costs

This setup is faster and more secure than cheap shared hosting.


🔗 Ready to Expand Your Free VPS Setup?

See updated free VPS providers here:
👉 https://gratisvps.net

You can now install multiple WordPress sites, create subdomains, or host a full blog — all without paying for hosting.

Index