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.
[email protected]:~# lsb_release -a [email protected]:~# apt-get update && apt-get upgrade -y
Install web service and database nariadb.
[email protected]:~# apt-get install apache2 apache2-utils -y [email protected]:~# systemctl enable apache2 [email protected]:~# systemctl start apache2 [email protected]:~# apt-get install mariadb-server -y
Setup mysql root password.
[email protected]:~# mysql_secure_installation
Default root password is blank then setup root password.
Step #02: Install some package and php.
[email protected]:~# apt install -y apt-transport-https lsb-release ca-certificates [email protected]:~# wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg [email protected]:~# echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list [email protected]:~# apt update [email protected]:~# apt install php7.4 -y [email protected]:~# 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.
[email protected]:~# 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.
[email protected]:~# wget -c http://wordpress.org/latest.tar.gz [email protected]:~# tar -xzvf latest.tar.gz [email protected]:~# rsync -av wordpress/* /var/www/html/ [email protected]:~# chmod -R 755 /var/www/html/ [email protected]:~# chown -R www-data:www-data /var/www/html/ [email protected]:~# rm -rf /var/www/html/index.html
Create database using mysql terminal.
[email protected]:~# 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 '[email protected]'; MariDB [(none)]> flush privileges; MariDB [(none)]> \q
copy wp-config-sample.php file name as wp-config.php
[email protected]:~# cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
Open wp-config.php file using any editor
[email protected]:~# 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', '[email protected]'); 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.
[email protected]:~# systemctl restart apache2.service [email protected]:~# systemctl restart mysql.service
Open default web config file then add your server ip address.
[email protected]:~# nano /etc/apache2/sites-available/000-default.conf
as like below config.
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html ServerName 10.66.11.10 <Directory /var/www/html/> AllowOverride All </Directory>
Now setup rewrite config and restart apache service.
[email protected]:~# a2enmod rewrite [email protected]:~# service apache2 restart [email protected]:~# touch /var/www/html/.htaccess [email protected]:~# chown :www-data /var/www/html/.htaccess [email protected]:~# 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 Odoo 16 on Ubuntu 22.04 - May 14, 2023
- 12 Steps to Organize Photos on Your Computer - March 20, 2023
- 9 Ways to Speed Up Your MacBook Yosemite - February 21, 2023
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!