How to Install WordPress on Manjaro
WordPress is a popular Content Management System (CMS) used for building websites, blogs, and e-commerce websites. In this tutorial, we will guide you through step-by-step instructions on how to install WordPress on Manjaro.
Prerequisites
Before we begin, make sure you have the following prerequisites:
- A working installation of Manjaro.
- Apache, MySQL, and PHP installed and configured in your system.
Step 1: Download WordPress
To download WordPress, we will use the following command in the terminal:
wget https://wordpress.org/latest.tar.gz
This command will download the latest version of WordPress in the current directory.
Step 2: Extract WordPress
Next, we need to extract the downloaded file. Run the following command in the terminal:
tar -xvzf latest.tar.gz
This command will extract all the files to a directory named 'wordpress' in the current working directory.
Step 3: Configure MySQL
Before we proceed with the installation, we need to create a database and a user for WordPress to interact with. Run the following commands in the terminal:
mysql -u root -p
This command will open the MySQL prompt. Enter your MySQL root user password when prompted.
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
By running the above commands, we have created a database named WordPress and a user called 'wpuser.'
Step 4: Configure Apache
Next, we need to configure Apache to serve WordPress. Run the following commands in the terminal:
sudo nano /etc/httpd/conf/httpd.conf
This command opens the Apache configuration file in the nano text editor. Search for the following line:
#LoadModule php7_module modules/libphp7.so
And Uncomment (delete the #) and save the file.
Then, search for the following lines:
DocumentRoot "/srv/http"
<Directory "/srv/http">
And Replace it with:
DocumentRoot "/path/to/wordpress"
<Directory "/path/to/wordpress">
Make sure to replace '/path/to/wordpress' with the absolute path to the WordPress directory.
Save and close the file.
Step 5: Complete Installation
Now that everything is configured, we can proceed with the WordPress installation process.
Open a web browser, and navigate to:
http://localhost/wp-admin/install.php
This should launch the WordPress installation wizard.
Follow the instructions on the screen and enter the necessary information when prompted.
Once the installation is complete, you should be able to log in to your WordPress site at:
http://localhost/wp-admin/
Conclusion
In this tutorial, we have shown you how to install WordPress on Manjaro. Now that you have WordPress installed, you can start building your website or blog. If you encounter any issues, feel free to consult the official WordPress documentation for more information.