# pacman -S nginx# systemctl start nginx# systemctl status nginxTo test, go to http://localhost
# pacman -S mysqlEnter a number (default=1): ## Press EnterInitialize the MariaDB data directory prior to starting the service:
# mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql# systemctl start mysqld# systemctl status mysqldSet MySQL/MariaDb root user password:
# mysql_secure_installationEnter current password for root (enter for none): ## Press EnterSet root password? [Y/n]## Press EnterNew password:## Enter passwordRe-enter new password: ## Re-enter passwordRemove anonymous users? [Y/n]## Press EnterDisallow root login remotely? [Y/n]## Press EnterRemove test database and access to it? [Y/n]## Press EnterReload privilege tables now? [Y/n]## Press Enter# pacman -S php-fpm php-mysqlEdit /etc/nginx/nginx.conf file and add the following text as marked in the red square on the screenshot on the right:
location ~ \.php$ { fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; root /usr/share/nginx/html; include fastcgi.conf; }# systemctl start php-fpm# nano /usr/share/nginx/html/test.php# systemctl restart nginxTo test, go to http://localhost/test.php
test.php file:
<?php phpinfo();?>$ mysql -u root -pMariaDB> CREATE DATABASE wordpress;MariaDB> GRANT ALL PRIVILEGES ON wordpress.* TO "wpuser"@"localhost" IDENTIFIED BY "password";MariaDB> FLUSH PRIVILEGES;MariaDB> EXITcd /usr/share/nginx/html/# wget https://wordpress.org/latest.tar.gz# tar xvzf latest.tar.gzGo to http://localhost/wordpress and fill the form. Under "username", type wpuser instead of wpuser@localhost. When clicking on "Let's go" button, you will get a permission error. Copy the automatically generated code and do the following:
cd /usr/share/nginx/html/wordpress# sudo nano wp-config.phpNow you can login from http://localhost/wordpress/wp-login.php
In order to install Plugins and Themes, you must configure two things:
First thing
# nano /usr/share/nginx/html/wordpress/wp-config.phpAppend define('FS_METHOD', 'direct');
and save
# systemctl restart nginxSecond thing
cd /usr/share/nginx/html/wordpress/# chmod -R 757 wp-content#!/bin/bashif [ "$1" == "" ]then systemctl start nginx systemctl start mysqld systemctl start php-fpmelif [ "$1" == "-s" ]then systemctl stop nginx systemctl stop mysqld systemctl stop php-fpmelif [ "$1" == "-r" ]then systemctl restart nginxelif [ "$1" == "-status" ]then echo "nginx:" systemctl status nginx | grep "Active" echo "mysqld:" systemctl status mysqld | grep "Active" echo "php-fpm:" systemctl status php-fpm | grep "Active"elif [ "$1" == "--help" ] || [ "$1" == "-h" ]then echo "Usage:" echo "'sudo ./server' will launch nginx, mysqld and php-fpm" echo "'sudo ./server -s' will stop nginx, mysqld and php-fpm" echo "'sudo ./server -r' will restart nginx" echo "'./server -status' will show the status of nginx, mysqld and php-fpm"else echo "Wrong argument supplied"fiDashboard -> Update
Dashboard -> Settings -> Permalinks -> Post name
Settings -> Reading -> Your homepage displays -> A static page -> Homepage: <select your page>
When initially creating the website, it is recommended to turn off Search Engine indexation:
Settings -> Reading -> Search Engine Visibility -> Discourage search engines from indexing this site
Content to put before each post in the feed: %%POSTLINK%%
Content to put after each post in the feed: <p>Original article at <a href="https://mydomain.com/" rel="nofollow">My Site</a></p>
Clickeable Component -> Content -> Link -> #target_anchor
Target anchor component -> Advanced -> CSS ID -> target_anchor (without hash symbol)
Appearance -> Menus -> Menu Structure -> Affected Page -> Disable link