In today’s world, everything is Internet and information sites. There is too much variety in them. But we also find a lot of variety of applications that allow us to make websites. In this way, we find a nice CMS competition.

That is to say, web applications that allow creating a blog without much effort. Of all these, WordPress is the most popular and solvent of all. That’s why, in this post, you will learn how to install WordPress on Debian 10, Buster.

What is WordPress?

WordPress is a CMS (content manager system) that is to say it is an application that allows you to create a blog of information. However, over time has evolved and not only provides services to create blogs but corporate websites or what you can imagine.

Thanks to WordPress and CMS, publish news and entries, do not require knowledge of HTML or PHP, but everything is visual.

So, if you want to have a personal blog or for educational purposes, WordPress is a pretty good solution.

Install WordPress on Debian 10

1) Install Apache and PHP

Being a web application, you need to have a web server running on our system. Of course, WordPress is compatible with other servers like Nginx, but in this case, we will use Apache webserver.

On the other hand, WordPress is programmed in PHP, so we need the language for it to work.

So, open a terminal session and type:

sudo apt install apache2 php7.3 libapache2-mod-php7.3 php7.3-common php7.3-mbstring php7.3-xmlrpc php7.3-soap php7.3-gd php7.3-xml php7.3-intl php7.3-mysql php7.3-cli php7.3-ldap php7.3-zip php7.3-curl
1.- Install Apache and PHP on Debian 10

Then, create a new PHP file to test the language.

:~$ sudo nano /var/www/html/test.php
<?php
phpinfo();
?>

After that, open it using the web browser, for example http://you-server/test.php. You will see something like this:

2.- PHP info

2) Install MySQL

WordPress requires a database manager. In Debian, we have MySQL which is one of the most popular and makes it a pretty good option for it.

To install it, run the following command:

:~$ sudo apt install default-mysql-server

Then, set a root password and secure the installation.

:~$ sudo mysql_secure_installation

Say “y” to all the questions.

3.- using the mysql_secure_installation script

After that, it is necessary to create a new database for WordPress. Also, create a new user too.

:~$ sudo mysql -u root -p
> CREATE DATABASE wordpress;
> GRANT ALL PRIVILEGES on wordpress.* TO 'wordpress_user'@'localhost' IDENTIFIED BY 'wordpress_pss123';
> FLUSH PRIVILEGES;
> EXIT;
4.- Crating the new database for WordPress

Now, we can continue with the next steps.

3) Install WordPress on Debian 10

Now it is your turn to install WordPress. However, first, you have to download it. For that, I will use wget.

So, run the following command:

:~$ cd /tmp/
:~$ wget -c https://wordpress.org/latest.tar.gz
5.- Download and install WordPress on Debian 10

Then, decompress it and move it to the /var/www/html/ folder. Next, set the right permissions to the folder.

:~$ tar -xvzf latest.tar.gz
:~$ sudo mv wordpress/ /var/www/html/
:~$ sudo chown -R www-data:www-data /var/www/html/wordpress/
:~$ sudo chmod 755 -R /var/www/html/wordpress/
6.- Installing WordPress on Debian 10

Next, create a new Virtualhost for WordPress.

:~$ sudo nano /etc/apache2/sites-available/wordpress.conf

And add the following:

<VirtualHost *:80>
     ServerAdmin admin@your_domain.com
      DocumentRoot /var/www/html/wordpress
     ServerName your-domain.com

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

     ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
     CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined

</VirtualHost>

Of course, replace “your-domain” with yours. Save the changes and close the file.

Then you have to enable the new Virtualhost and also the Apache rewrite module. And for all this to work, then we’ll have to restart Apache.

:~$ sudo ln -s /etc/apache2/sites-available/wordpress.conf /etc/apache2/sites-enabled/wordpress.conf
:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2

Now complete the installation.

4) Complete the installation using the web interface

Now, you have to complete the installation using the web browser. Access to your server and you will see this. So, select the installation language.

7.- Installation Language

Next, you will see all the steps you have to complete to install WordPress on Debian 10.

8.- WordPress installation

Then, set the parameters of the database.

9.- Database parameters on the installation

Next, if everything is OK, you will see this. So you can start with the installation.

10.- Starting the installation

After that, you have to define the admin account and the site information.

11.- Site information and admin account

Next, log in.

12.- WordPress login

Finally, you will see the WordPress Dashboard.

13.- WordPress Dashboard

And that is it. You can start to work with WordPress and create your web site.

Conclusion

WordPress is a fairly popular CMS. Thanks to this application, you can create your website in a short time and without great knowledge of HTML. Also, in this post, you have seen that installing it is not too complicated for the great advantages it provides.

klaner
Previous articleHow to install Quassel IRC client and connect to Freenode
Next articleirc.h4ck.se is up! (Here’s how to connect)
enCyde avatar
Stubborn and slightly annoyed nerd. I'm a Dad above all else. All articles and posts are made as a private person.
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments