Debian Tutorial – Hello everyone, today I will guide you how to install WordPress on Debian 9. As you know, WordPress is a free, popular Content Management System which is easy to use and very stable. It has been used widely by millions of users around the world.
Steps to install WordPress on Debian 9 Stretch
- Install LAMP Server on Debian 9
- Create new MySQL Database and user for WordPress
- Install and configure WordPress
Step 1. Install LAMP Server on Debian 9
Please read my previous tutorial to install LAMP Server on Debian 9. Make sure you follow the steps shown on that page and ensure that your web server is up and running before proceeding to the next steps.
Step 2. Create a new MySQL Database and user for WordPress
Open Terminal or login via SSH to Debian and then log in to MySQL. The following example below shown how I created a new database called ‘wordpress’ and new user called ‘wordpress’ with password ‘12345’.
root@debian-vm:/var/www/html# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 470 Server version: 10.1.23-MariaDB-9+deb9u1 Debian 9.0 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database wordpress; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> create user wordpress@localhost identified by '12345'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> grant all privileges on wordpress.* to wordpress@localhost identified by '12345'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> exit; Bye
Step 3. Install and Configure WordPress
First we need to download latest version of WordPress. You can use the following command to download.
cd /tmp wget http://wordpress.org/latest.tar.gz
tar -xvf latest.tar.gz
It will produce a new directory called wordpress. You can rename it to anything but on this tutorial, I leave it as wordpress.
chown -R www-data:www-data /tmp/wordpress
Move to the apache web serve root
mv wordpress /var/www/html/
Configure WordPress via Web Browser
Now open a web browser and type the Debian IP address with the following format:
Change ip_address with your actual IP address. Now the installation wizard will open up and enter the details required on that page.
Now you can enjoy your new WordPress site on Debian 9 Server. Thanks for reading this how to Install WordPress on Debian 9, leave us comments if any queries. You may want to check out my other interesting tutorial relating to Debian 9 below:
- Install Owncloud 10 on Debian 9 Stretch
- Install OnlyOffice Server on Debian 9
- Enable SSL on Owncloud 10 on Debian 9