How to install WordPress on Ubuntu

What is WordPress

WordPress is a widely-used open-source content management system (CMS) that powers a significant portion of websites on the internet. Known for its user-friendly interface and versatility, WordPress allows users to create and manage websites without extensive technical expertise. It offers a vast library of themes and plugins, enabling customization for diverse purposes, from blogs and portfolios to e-commerce sites. With its intuitive dashboard, users can easily add and edit content, making it a popular choice for both beginners and experienced developers. WordPress supports responsive design, ensuring websites function seamlessly across devices. Its large and active community contributes to ongoing improvements and provides ample support. As a dynamic platform, WordPress continues to evolve, maintaining its position as a dominant force in the world of website creation and management.

Install Apache, MySQL, PHP

				
					apt update && apt upgrade -y

#Install apache2
apt install apache2
systemctl status apache2

#Install MySQL
apt install mariadb-server mariadb-client
mysql_secure_installation

#Install PHP
apt install php php-mysql

vim /var/www/html/info.php
#Apppend the following lines:

<?php
phpinfo();
?>
#Save and Exit.
#Check it on browser
https://ip-address/info.php

#Create WordPress Database
mysql -u root -p
CREATE DATABASE wordpress_db;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON wordpress_db.* TO 'wp_user'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

Exit;
				
			

Install WordPress

				
					cd /tmp && wget https://wordpress.org/latest.tar.gz
tar -xvf latest.tar.gz
cp -R wordpress /var/www/html/
chown -R www-data:www-data /var/www/html/wordpress/
chmod -R 755 /var/www/html/wordpress/
mkdir /var/www/html/wordpress/wp-content/uploads
chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads/
				
			

Open Browser https://server-ip/wordpress

Leave a Comment

Your email address will not be published. Required fields are marked *