Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is an most popular opensource CMS. You can install on your vps or local server using my tutorial.
My server info :
Server IP : 10.66.11.15
Disk : 25 GB
RAM : 1GB
vCPU : 2
Service : WordPress
Web : Apache
Database : Mariadb
Php : 7.4
root@WordPress:~# lsb_release -a root@WordPress:~# ip r
root@WordPress:~# apt-get update && apt-get upgrade -y root@WordPress:~# apt-get install apache2 apache2-utils -y root@WordPress:~# systemctl enable apache2 root@WordPress:~# systemctl start apache2 root@WordPress:~# apt install mariadb-server -y root@WordPress:~# systemctl enable mariadb root@WordPress:~# systemctl start mariadb root@WordPress:~# mysql_secure_installation
Press y| Y Y press enter
Do you want to continue press y|Y Y press enter
Remove anonymous user press y|Y Y press enter
Disallow root login remoetly y|Y Y press enter
Remove test database and access to it y|Y Y press enter
Reload privilege tables now? y|Y Y press enter
root@WordPress:~# apt-get install php7.4 php7.4-mysql libapache2-mod-php7.4 php7.4-cli php7.4-cgi php7.4-gd -y root@WordPress:~# vi /var/www/html/tech.php
Insert below code into tech.php file.
//PHP code goes here
Browse your server ip address with file name tech.php
http://10.66.11.15/tech.php
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
root@WordPress:~# mysql -u root -p
If you not setup mysql root password from step #2 last command. So it is default password is blank.
MariaDB [(none)]> create database wp_db; MariaDB [(none)]> grant all privileges on wp_db.* to 'wp_db_user'@'localhost' identified by 'wp_db_passw0rd'; MariaDB [(none)]> flush privileges; MariaDB [(none)]> q
root@WordPress:~# mv /var/www/html/wp-config-sample.php /var/www/html/wp-config.php root@WordPress:~# vi /var/www/html/wp-config.php
Now insert below details already created from Step #4.
define('DB_NAME', 'wp_db'); define('DB_USER', 'wp_db_user'); define('DB_PASSWORD', 'wp_db_passw0rd'); define('DB_HOST', 'localhost'); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', '');
Restart apache and mariadb server and check default vHost file is ok.
root@WordPress:~# systemctl restart apache2.service root@WordPress:~# systemctl restart mariadb.service root@WordPress:~# vi /etc/apache2/sites-available/000-default.conf
Like example below
ServerAdmin webmaster@localhost DocumentRoot /var/www/html ServerName server_domain_name_or_IPAllowOverride All ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
root@WordPress:~# a2enmod rewrite root@WordPress:~# systemctl restart apache2 root@WordPress:~# touch /var/www/html/.htaccess root@WordPress:~# chown :www-data /var/www/html/.htaccess root@WordPress:~# chmod 664 /var/www/html/.htaccess root@WordPress:~# service apache2 restart
Now browse your server ip address and complete installation process.
http://10.66.11.15/
Then click Continue and type site title, Username, Password and Your Email. Now click Install WordPress.
If all is ok so you see Success!
WordPress has been installed. Thank you and enjoy!
For more details see my YouTube video.
The post How To Install WordPress On Ubuntu 20.04 appeared first on TechnologyRSS.
Career progression doesn’t follow a single path – and at Canonical, we embrace that. Our…
Canonical’s Platform Engineering team has been hard at work crafting documentation in Rockcraft and Charmcraft…
This is a follow-up to the End of Life warning sent earlier to confirm that…
July 10, 2025: Today, Canonical announced the release of Charmed Feast, an enterprise solution for…
For NVIDIA users, the latest 575 series driver will be available soon in Ubuntu repository.…
Amarok, the free open-source KDE music player, released new 3.3 version on Tuesday, named “Far…