LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

Setup a Highly Available Wordpress Site From Scratch, 2024 Edition! Part 5: Wordpress Install

Highly Available WordPressIn this tutorial series, we are setting up a highly available WordPress web site from scratch. 

Part 1 – Introduction, Considerations, and Architecture
Part 2 – Ordering the VPSes 
Part 3 – Ansible
Part 4 – Gluster
Part 5 – WordPress install (this article)
Part 6 – MariaDB Multi-Master
Part 7 – Round-Robin DNS, Let’s Encrypt, & Conclusion

Now that we’ve got Gluster up and running, let’s leverage it to make setting up WordPress on each node easy.  WordPress needs two things:

  1. It’s php files, directories, config files, etc. installed on the web server
  2. A database

In this part, we’re going to do part 1 on all three files (Gluster magic!) and then install WordPress on node1 only.  Once we’ve got MariaDB replication working, all three nodes will be able to talk to the database.

On Each Node

mv /web/www.lowend.party /gluster
ln -s /gluster/www.lowend.party /web/www.lowend.party

This moves our web directory to Gluster.  From now on, any change on any node will be reflected on all nodes.

On node1

cd /web/www.lowend.party
wget https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress/* .
rmdir wordpress
rm latest.zip

This sets up WordPress to be in our domain’s root.  If you want it served up at something like www.example.com/wordpress, you could skip the mv and rmdir commands.

Setting Up WordPress

We need to setup DNS temporarily for www.lowend.party.  There are two ways to do this.

The first would be to create a DNS A record or CNAME that points www.lowend.party to node1.lowend.party.

But an easier way would be to modify your PC’s hosts file.  On macOS or Linux, that’s /etc/hosts.  On Windows, it’s c:\windows\system32\drivers\etc\hosts.

Put this entry in it: node1.lowend.party node1 www.lowend.party

Now you can go to your preferred web browser and head to http://www.lowend.party and run the WP installer.

It’s just answering questions but if you need a guide, one is available from wordpress.org.

Wordpress Install

Wordpress Install

Wordpress Install

Wordpress Install

Now WP the WordPress PHP files are setup on each server, and we have WP setup to run on node1.  Now let’s get MariaDB replication going in the next tutorial!



No Comments

    Leave a Reply

    Some notes on commenting on LowEndBox:

    • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
    • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
    • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

    Your email address will not be published. Required fields are marked *