How To Install WordPress v5.7 on Debian 107 min read
In this tutorial how to install WordPress 5.7 on Debian 10 server. WordPress is a popular content management system. You can easily manage your content using WordPress. Most of the web site created using WordPress cms.
★ How To Upgrade Zabbix Server 4.0 To 4.4 On CentOS 8
★ Create WordPress Social Login Plugin With Facebook Developer
My server info.
Operating system : Debian 10 IP address : 10.66.11.10 Disk : 25GB RAM : 1GB vCPU : 2 Web server : APache Database : MariaDB PHP version : 7.2 vWP : 5.7
Step #01: Must be server update and upgrade.
root@WordPress:~# lsb_release -a root@WordPress:~# apt-get update && apt-get upgrade -y
Install web service and database nariadb.
root@WordPress:~# apt-get install apache2 apache2-utils -y root@WordPress:~# systemctl enable apache2 root@WordPress:~# systemctl start apache2 root@WordPress:~# apt-get install mariadb-server -y
Setup mysql root password.
root@WordPress:~# mysql_secure_installation
Default root password is blank then setup root password.
Step #02: Install some package and php.
root@WordPress:~# apt install -y apt-transport-https lsb-release ca-certificates root@WordPress:~# wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg root@WordPress:~# echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list root@WordPress:~# apt update root@WordPress:~# apt install php7.4 -y root@WordPress:~# apt-get install php7.4 php7.4-mysql libapache2-mod-php7.4 php7.4-cli php7.4-cgi php7.4-gd -y
Default root password is blank then setup root password.
Test php is working fine. Create one tech.php file.
root@WordPress:~# nano /var/www/html/tech.php
Insert below line into this file.
<?php phpinfo(); //PHP code goes here ?>
Then browse your server ip address.
http://10.66.11.7/tech.php
Step #03: Download latest WordPress and setup permission.
root@WordPress:~# wget -c http://wordpress.org/latest.tar.gz root@WordPress:~# tar -xzvf latest.tar.gz root@WordPress:~# rsync -av wordpress/* /var/www/html/ root@WordPress:~# chmod -R 755 /var/www/html/ root@WordPress:~# chown -R www-data:www-data /var/www/html/ root@WordPress:~# rm -rf /var/www/html/index.html
Create database using mysql terminal.
root@WordPress:~# mysql -u root -p
Then run below command.
MariDB [(none)]> create database wp_db character set utf8 collate utf8_bin; MariDB [(none)]> grant all privileges on wp_db.* TO 'wp_db_user'@'localhost' identified by 'wp_db_pass@123'; MariDB [(none)]> flush privileges; MariDB [(none)]> \q
copy wp-config-sample.php file name as wp-config.php
root@WordPress:~# cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
Open wp-config.php file using any editor
root@WordPress:~# nano /var/www/html/wp-config.php
Insert database info into this file wp-config.php
define('DB_NAME', 'wp_db');
define('DB_USER', 'wp_db_user');
define('DB_PASSWORD', 'wp_db_pass@123');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
Then save and exit. Ctrl+x then press y, then press Enter.
Now restart some package.
root@WordPress:~# systemctl restart apache2.service root@WordPress:~# systemctl restart mysql.service
Open default web config file then add your server ip address.
root@WordPress:~# nano /etc/apache2/sites-available/000-default.conf
as like below config.
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ServerName 10.66.11.10 <Directory /var/www/html/> AllowOverride All </Directory>
Now setup rewrite config and restart apache service.
root@WordPress:~# a2enmod rewrite root@WordPress:~# service apache2 restart root@WordPress:~# touch /var/www/html/.htaccess root@WordPress:~# chown :www-data /var/www/html/.htaccess root@WordPress:~# chmod 664 /var/www/html/.htaccess
Now setup rewrite config and restart apache service.
http://10.66.11.7/
Step #04: Goto your server ip address and complete installation process.
Welcome
Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.
Step #05: Type site title, username, password and mail.
Step #06: Then come login page.
Then show Dashboard page.
How To Create First Post On Your WordPress Blog
If any problem so please see my YouTube channel for more videos.
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!
Great information! Thanks a lot.
Most Welcome!