Setting up WordPress on a LEMP stack (Linux, Nginx, MariaDB, PHP) usually involves several steps: downloading WordPress, creating databases, and manually configuring Nginx site templates. But what if you could automate all of this with just one script?

That’s exactly what we’ll show you today. With our free automated bash script, you can install WordPress on AlmaLinux OS with LEMP in just a few minutes. This script doesn’t just install WordPress — it also configures your Nginx site template and links your domain automatically, saving you valuable time.

Why Automate WordPress Installation?

Installing WordPress manually is a solid way to learn, but when you’re managing multiple sites or want to speed up your workflow, automation is the way to go. Here’s why:

  • Saves time — Installs WordPress, sets up databases, and configures Nginx in one go.
  • Consistency — Ensures each installation follows best practices and proper configurations.
  • Ease of use — Beginner-friendly setup with guided prompts.
  • Domain integration — Automatically links your domain name to the VPS IP.
  • Optimized setup — Implements secure and efficient Nginx configurations.

Whether you’re a seasoned developer or just getting started, this script makes deploying WordPress sites on AlmaLinux simple and efficient.

Prerequisites

Before running the auto-install script, you’ll need:

  • A VPS running AlmaLinux OS with a LEMP stack installed
  • A registered domain name pointed to your VPS IP
  • SSH access to your VPS (root or sudo privileges)
  • Nano text editor installed (dnf install nano -y)

👉 Don’t have a VPS yet? Order a RackNerd VPS — affordable plans, SSD RAID-10 storage, and 24/7 support make it the perfect choice for WordPress hosting.

Step-by-Step: Automate WordPress Installation

Step 1: Point Your Domain to Your VPS

Go to your domain registrar’s DNS management panel and add:

  • An A record pointing your domain (domain.com) to your VPS IP
  • An A record or CNAME for www pointing to the same IP

Step 2: Connect to Your Server

Use an SSH client (e.g., PuTTY, Bitvise) to connect to your AlmaLinux VPS:

ssh root@your-vps-ip

Step 3: Prepare the Auto-Install Script

  1. Download the provided bash script from RackNerd’s resource link here: https://blog.racknerd.com/wp-content/uploads/2023/06/LEMP_AutoWP.zip
  2. Copy the script contents locally.
  3. On your VPS, create a new file:
    nano autowp.sh
  4. Paste the script content into the editor.
  5. Save and exit (CTRL+O, ENTER, CTRL+X).

Step 4: Make the Script Executable

Run:

chmod +x autowp.sh

Step 5: Run the Auto-Installer

Start the script:

sh autowp.sh

You’ll be prompted for details such as:

  • Database root and new user credentials
  • Domain name for your WordPress site
  • Installation directory path
  • Nginx site configuration

The script will handle:

  • Updating your system
  • Creating the WordPress database
  • Downloading and installing WordPress
  • Configuring Nginx site templates
  • Adjusting SELinux permissions
  • Optimizing Nginx and PHP settings

Step 6: Complete the WordPress Setup

Once the script finishes, open your domain in a browser. You’ll see the WordPress setup wizard where you can:

  • Choose a site title
  • Create your WordPress admin account
  • Select a theme and start customizing

At this point, your WordPress site is fully installed and running on LEMP with AlmaLinux.

What’s Next?

Now that WordPress is live, you can:

  • Install plugins and themes to expand functionality
  • Configure SSL (Let’s Encrypt) for HTTPS security
  • Back up your site regularly
  • Optimize caching for faster performance

RackNerd VPS Hosting for WordPress

RackNerd’s VPS hosting is optimized for WordPress and LEMP environments. With us, you’ll enjoy:

  • Full root access and flexibility
  • SSD RAID-10 storage for speed and reliability
  • 1Gbps network ports
  • Choice of Linux distributions including AlmaLinux
  • 24/7 support from real engineers

Whether you’re building a personal blog or managing multiple client sites, RackNerd provides the performance and reliability you need.

👉 Order your VPS today and start deploying WordPress with ease.

Conclusion

Automating WordPress installation with our bash script saves time, reduces errors, and ensures consistent configurations. By combining AlmaLinux, LEMP, and RackNerd’s powerful VPS hosting, you’ll be able to focus less on setup and more on building amazing websites.

Get started today — and let your next WordPress project go live faster than ever before.

Automatically Install WordPress with LEMP on AlmaLinux OS (Video Tutorial):

Server Hosting Solutions by RackNerd:

Shared Hosting
cPanel Web Hosting in US, Europe, and Asia datacenters
Logo
Reseller Hosting
Create your new income stream today with a reseller account
Logo
VPS (Virtual Private Server)
Fast and Affordable VPS services - Instantly Deployed
Logo
Dedicated Servers
Bare-metal servers, ideal for the performance-demanding use case.
Logo

Leave a comment

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