How To Setup WordPress in Arch Manjaro Linux

Prabin Karki
2 min readFeb 12, 2020

To be able to run Services like WordPress following things should be setup in your Machine

Install Apache on Arch Manjaro

To install a Apache on arch run
sudo pacman -S apache

To Start a Apache on arch run
sudo apachectl start
if configuration file is needed you can find it in
/etc/httpd/conf . We will use them to install php for Apache and MySQL for Apache.

Install PHP for Apache on Arch/Manjaro

We want to use PHP with Apache HTTP Server on our machine to be able to run services like WordPress and others locally. After we installed Apache we are now able to install and configure PHP to work with it.

Install php for Apache
sudo pacman -S php php-apache

Configuration
edit the main Apache config File /etc/httpd/conf/httpd.conf

comment the line, by adding a #:

#LoadModule mpm_event_module modules/mod_mpm_event.so

uncomment the line, by removing the #:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Place this at the end of the LoadModule list:

LoadModule php7_module modules/libphp7.so
AddHandler php7-script php

Place this at the end of the Include list:

Include conf/extra/php7_module.conf

Restart Apache
sudo apachectl restart

We can verify that PHP is correctly configured by creating a File
/srv/http/test.php and write your php simple code :
To see if it works we go to: http:localhost/test.php

Install MySQL for Apache on Arch/Manjaro

We want to use MySQL with Apache HTTP Server on our machine in order to run WordPress and other services like it. Since we install Apache and PHP for Apache we are now able to install MySQL and configure it to work with PHP.

PHP Configurations
Uncomment the following lines in /etc/php/php.ini, by removing the #:

extension=pdo_mysql.so
extension=mysqli.so

Installation
sudo pacman -S mariadb
sudo mysql_install_db — user=mysql — basedir=/usr — datadir=/var/lib/mysql

Start MySQL
sudo systemctl start mysqld

Installing WordPress

Install the WordPress package
sudo pacman -S wordpress

Configure Apache
Make sure that MySQL is running! if not run
sudo systemctl start mysqld

login as a root and create a database and give a full privileges to the required user to the created database
and run localhost/wordpress to browser

--

--