Skip to content

Commit

Permalink
wordpress-on-lamp.md
Browse files Browse the repository at this point in the history
Grammar Check
  • Loading branch information
gannazhyrnova authored Jan 9, 2025
1 parent da725c4 commit d7abdac
Showing 1 changed file with 11 additions and 11 deletions.
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.

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.

0 comments on commit d7abdac

Please sign in to comment.