Hello there! today we are going to see about wordpress and how to in ubuntu
what is wordpress?
WordPress is an open-source content management system (CMS). It’s a popular tool for individuals without any coding experience who want to build websites and blogs. The software doesn’t cost anything. Anyone can install, use, and modify it for free.
lets see how to install it in ubuntu
- $ sudo apt-get update
- $ sudo apt-get upgrade
- $ sudo apt-get install apache2 apache2-utils
We need to enable the Apache2 web server to start at system boot time, as well as start the service and verify the status as follows
- $sudo apt install apache2
- $ sudo systemctl enable apache2
- $ sudo systemctl start apache2
- $ sudo systemctl status apache2
- sudo apt update
- sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y
- sudo add-apt-repository ppa:ondrej/php
Install PHP and additional PHP extensions
- $ sudo apt install php
- $ sudo apt install php8.1-{bcmath,xml,fpm,mysql,zip,intl,ldap,gd,cli,bz2,curl,mbstring,pgsql,opcache,soap,cgi}
Version
$ php -v
Create Database for Laravel Application MariaDB
- $ sudo apt install mariadb-server
Once the database server is installed, log into the MariaDB prompt:
- sudo vi /var/www/html/info.php
<?php
phpinfo();
?>
then run it http://server_address/info.php
Download the latest version of the WordPress package and extract it by issuing the commands below on the terminal:
- $ wget -c http://wordpress.org/latest.tar.gz
- $ tar -xzvf latest.tar.gz
- $ sudo mv wordpress/* /var/www/html/
- $ sudo chown -R www-data:www-data /var/www/html/
- $ sudo chmod -R 755 /var/www/html/
- $ sudo mysql -u root -p
Once logged in create the database, database user, and grant all privileges to
the database user.
- CREATE DATABASE laravel_db;
- CREATE USER 'laravel_user'@'localhost' IDENTIFIED BY ‘1234’;
- GRANT ALL ON laravel_db.* TO 'laravel_user'@'localhost';
- FLUSH PRIVILEGES;
- QUIT;
then
- $ cd /var/www/html/
- $ sudo mv wp-config-sample.php wp-config.php
- $ sudo rm -rf index.html
change db name,db user, give db passwd,leave rest
- $ sudo systemctl restart apache2.service
- $ sudo systemctl restart mysql.service
once completed this process u can visit your website or ip.
http://server_address
OR
thats all for this blog.thank you
Comments