How to install superfast a WordPress Site on Ubuntu

sudo apt install apache2 -y

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

sudo apt-get install mariadb-server -y
sudo apt-get install mariadb-client -y

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

sudo mysql_secure_installation

enter
y
y
y
y
sudo systemctl restart mariadb.service

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update -y

sudo apt install php7.1 libapache2-mod-php7.1 php7.1-common php7.1-mbstring php7.1-xmlrpc php7.1-gd php7.1-xml php7.1-mysql php7.1-cli php7.1-mcrypt php7.1-zip php7.1-curl

sudo mysql -u root -p

CREATE DATABASE wpdatabase;
CREATE USER 'wpdatabaseuser'@'localhost' IDENTIFIED BY 'Teszt123';
GRANT ALL ON wpdatabase.* TO 'wpdatabaseuser'@'localhost' IDENTIFIED BY 'Teszt123' WITH GRANT OPTION;

FLUSH PRIVILEGES;
EXIT;


cd /tmp && wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
sudo mv wordpress /var/www/html/wordpress


sudo chown -R www-data:www-data /var/www/html/wordpress/
sudo chmod -R 755 /var/www/html/wordpress/

sudo nano /etc/apache2/sites-available/wordpress.conf


<VirtualHost *:80>
     ServerAdmin itengineersblog@gmail.com
     DocumentRoot /var/www/html/wordpress/
     ServerName whatever.me
     ServerAlias www.whatever.me

     <Directory /var/www/html/wordpress/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>


sudo a2ensite wordpress.conf
sudo a2enmod rewrite

sudo systemctl restart apache2.service


sudo mv /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php

sudo nano /var/www/html/wordpress/wp-config.php


wpdatabase
wpdatabaseuser
Teszt123

http://YourIPHere/wp-admin

Done

Leave a Reply

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