Install WordPress on Debian VPS

Today we will show you how to install WordPress on a Debian VPS using Apache web-server and MySQL database. WordPress is an open source CMS, often used as a blog publishing application powered by PHP and MySQL. Currently WordPress is the most popular of the blogging platforms available. Before you begin installing, please make sure you have Apache/PHP and MySQL installed on your WordPress VPS .


Download wordpress

wget -q -O - "" | tar -xzf - -C /var/www --transform s/wordpress/

The above command will download and extract the WordPress archive file in the /var/www/ directory

Change permissions

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


Create MySQL database

mysql -u root -p
 CREATE DATABASE yourwpdb CHARACTER SET utf8 COLLATE utf8_general_ci;
 GRANT ALL PRIVILEGES ON yourwpdb.* TO yourwpuser@localhost IDENTIFIED BY 'yourwpdbpass';


Apache virtual host

Open/create a new file

nano /etc/apache2/sites-available/

Add the following content:

<VirtualHost *:80>
 DocumentRoot /var/www/
 DirectoryIndex index.php
 <Directory /var/www/>
   Options FollowSymLinks
   AllowOverride All
 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined

The command below symbolically links your virtual host file from sites-available to the sites-enabled directory.


Restart Apache with the following command:

/etc/init.d/apache2 restart

Finally, open up your browser, navigate to and finish the installation wizard.

* This guide should work on on most Debian based systems including Ubuntu.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

How to install and configure eXo Platform with Java and Apache as a reverse proxy
Install Cockpit CMS on Ubuntu 16.04
Install Craft CMS on CentOS 7
  • GBolt


    Author Reply

    Neat and easy. Thanks.