WordPress is one of the most used CMS systems in the world. Its successful adoption is a result of the open source model and a huge community around the software. WordPress is licensed under GPLv2 and has plenty of themes and plugins thus making it simple to customize. In this tutorial i’ll show show full steps on how to setup wordpress website on Arch Linux / Manjaro Linux. This setup will include configuring php and mysql database.
WordPress is an easy to customize and administer platform yet very powerful content management system. The whole installation and configuration of WordPress on Arch Linux is a clean and straightforward process, so let’s get started.
Step 1: Update Arch Linux / Manjaro System
Let’s start the installation by upgrading the system:
$ sudo pacman -Syu
:: Synchronizing package databases...
core is up to date
extra 1549.6 KiB 3.78 MiB/s 00:00 [#########################################################] 100%
community 5.5 MiB 8.95 MiB/s 00:01 [#########################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (1) libldap-2.4.58-3
Total Download Size: 0.30 MiB
Total Installed Size: 0.91 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] yStep 2: Install Apache httpd web server
Once the system is updated perform installation of Apache web server:
$ sudo pacman -Sy apache vim bash-completion
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
resolving dependencies...
looking for conflicting packages...
Packages (3) apr-1.7.0-3 apr-util-1.6.1-8 apache-2.4.47-1
Total Download Size: 2.10 MiB
Total Installed Size: 8.16 MiB
:: Proceed with installation? [Y/n] ySet servername:
$ sudo vim /etc/httpd/conf/httpd.conf
ServerName mysite.example.comStart Apache web server after installation:
sudo systemctl enable --now httpdLet’s confirm service status:
$ systemctl status httpd
● httpd.service - Apache Web Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-05-28 19:49:13 UTC; 37s ago
Main PID: 814 (httpd)
Tasks: 82 (limit: 2336)
Memory: 6.8M
CPU: 30ms
CGroup: /system.slice/httpd.service
├─814 /usr/bin/httpd -k start -DFOREGROUND
├─815 /usr/bin/httpd -k start -DFOREGROUND
├─816 /usr/bin/httpd -k start -DFOREGROUND
└─817 /usr/bin/httpd -k start -DFOREGROUND
May 28 19:49:13 archlinux systemd[1]: Started Apache Web Server.Step 3: Install PHP on Arch Linux / Manjaro Linux
Run the following commands to install PHP and basic extensions on Arch Linux / Manjaro:
$ sudo pacman -Sy php php-{cgi,gd,pgsql,fpm,apache}
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
resolving dependencies...
looking for conflicting packages...
....
Total Download Size: 27.55 MiB
Total Installed Size: 143.27 MiB
:: Proceed with installation? [Y/n] yUncomment the following lines in /etc/php/php.ini to MySQL/MariaDB extensions:
$ sudo vim /etc/php/php.ini
extension=pdo_mysql
extension=mysqliStep 4: Install MariaDB database server
Next is installation of MariaDB database server on Arch Linux / Manjaro:
$ sudo pacman -S libmariadbclient mariadb mariadb-clients
resolving dependencies...
looking for conflicting packages...
Packages (6) jemalloc-1:5.2.1-3 libaio-0.3.112-2 lzo-2.10-3 mariadb-10.5.10-1 mariadb-clients-10.5.10-1 mariadb-libs-10.5.10-1
Total Download Size: 36.35 MiB
Total Installed Size: 305.29 MiB
:: Proceed with installation? [Y/n] yInitialize database server using the commands below:
$ sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system 'root' user to connect. Use, for example, sudo mysql
The second is mysql@localhost, it has no password either, but
you need to be the system 'mysql' user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo
See the MariaDB Knowledgebase at https://mariadb.com/kb or the
MySQL manual for more instructions.
You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl
Please report any problems at https://mariadb.org/jira
The latest information about MariaDB is available at https://mariadb.org/.
You can find additional information about the MySQL part at:
https://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/Start and enable MariaDB service:
sudo systemctl enable --now mysqld.serviceSecure your database server:
$