Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions docs/guides/cms/wordpress-on-lamp.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: WordPress on LAMP
author: Joseph Brinkman
contributors: Steven Spencer
contributors: Steven Spencer, Ganna Zhyrnova
tested_with: 9.2
---

Expand All @@ -12,11 +12,11 @@ tested_with: 9.2

## Introduction

WordPress is an open source content management system (CMS) noted for its [famous 5 minute install](https://developer.wordpress.org/advanced-administration/before-install/howto-install/). It is commonly deployed on a LAMP (Linux, Apache, MySQL, PHP) stack. Although efficient local development tools such as [XAMPP](https://www.apachefriends.org/), [Vagrant](https://www.vagrantup.com/), and [wp-env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) are widely available, manually installing WordPress on LAMP for local development provides a valuable hands-on approach for beginners seeking greater understanding.
WordPress is an open-source content management system (CMS) noted for its [famous 5-minute install](https://developer.wordpress.org/advanced-administration/before-install/howto-install/). It is commonly deployed on a LAMP (Linux, Apache, MySQL, PHP) stack. Although efficient local development tools such as [XAMPP](https://www.apachefriends.org/), [Vagrant](https://www.vagrantup.com/), and [wp-env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) are widely available, manually installing WordPress on LAMP for local development provides a valuable hands-on approach for beginners seeking greater understanding.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, @gannazhyrnova, I think it is correct without the hyphen:
"open source" (without a hyphen) when referring to the concept as a whole, and "open-source" (with a hyphen) when used as an adjective before a noun, like "open-source software."
There's another rule out there that I've read that says to Never use it as an adjective. Thoughts?

This guide assumes you already have Rocky Linux 9.x installed, thereby covering the 'L' part of the LAMP stack.

The goal of this guide is exploring how you can manually install WordPress with the LAMP stack on a Rocky Linux 9 machine. This is not a production-ready guide but a starting point to build off of. The LAMP setup included in this guide is not recommended for anything other than local development without first taking proper security measures requiring additional configuration.
This guide explores how to manually install WordPress with the LAMP stack on a Rocky Linux 9 machine. This is not a production-ready guide but a starting point to build on. The LAMP setup included in this guide is not recommended for anything other than local development without first taking proper security measures requiring additional configuration.

## Upgrade system packages

Expand All @@ -26,25 +26,25 @@ Ensure your system's packages are up-to-date:
sudo dnf upgrade -y
```

## Install apache
## Install Apache

Apache is a web server and is what will be serving our WordPress site. Install it:
Apache is a web server that will serve your WordPress site. Install it with the following:

```bash
sudo dnf install httpd -y
```

## Enable Apache to start on boot

After installing apache, enable it so it starts automatically on boot:
After installing Apache, enable it so it starts automatically on boot:

```bash
sudo systemctl enable --now httpd
```

## Install MariaDB

WordPress stores dynamic content in a MySQL database. MariaDB is an open source fork of MySQL. Install it:
WordPress stores dynamic content in a MySQL database. MariaDB is an open source fork of MySQL. Install it with the following:

```bash
sudo dnf install mariadb-server -y
Expand Down Expand Up @@ -88,7 +88,7 @@ Install PHP and necessary packages to connect to MySQL:
sudo dnf install php php-mysqlnd php-gd php-xml php-mbstring
```

After installing PHP you must reload Apache to install it as an apache module and read its configuration files:
After installing PHP, you must reload Apache to install it as an Apache module and read its configuration files:

## Restart Apache

Expand Down Expand Up @@ -166,7 +166,7 @@ Grant all privileges to your WordPress database to the user you just created:
GRANT ALL PRIVILEGES ON LOCALDEVELOPMENTENV.* TO 'admin'@'localhost';
```

Flush privileges to ensure application of changes:
Flush privileges to ensure the application of changes:

```bash
FLUSH PRIVILEGES;
Expand Down Expand Up @@ -216,7 +216,7 @@ Reload `firewalld` to ensure changes to take effect:
sudo systemctl reload firewalld
```

## SE Linux settings
## SELinux settings

To allow Apache read and write access to your WordPress files, run this command:

Expand All @@ -236,4 +236,4 @@ To allow Apache to make network connections, run this command:

## Conclusion

You should now be able to connect to WordPress across the network, with the hostname or private IP address of the server, and finish the WordPress install. Remember, this setup is primarily intended for local development purposes. For production use, you would need additional configurations: setting a domain name, installing an SSL certificate, hardening your Apache server, fine tuning your SELinux configuration, and implementing backups. Nevertheless, by following this guide you have created a solid starting point for WordPress development on a LAMP stack.
To finish the installation, you should now be able to connect to WordPress across the network using the server's hostname or private IP address. Remember, this setup is primarily intended for local development purposes. For production use, you need to configure the following: set a domain name, install an SSL certificate, harden your Apache server, fine-tune your SELinux configuration, and implement backups. Nevertheless, following this guide has created a solid starting point for WordPress development on a LAMP stack.
Loading