How to Use InitOps – Deploy a Production-Ready WordPress Server with a Single Command

Setting up a fresh WordPress VPS manually is rarely enjoyable. Installing Nginx, PHP, MariaDB, Redis, configuring firewalls, SSL certificates, cron jobs, performance tuning, and security hardening can easily consume hours — and a single misconfiguration is enough to create instability or performance bottlenecks later.

How to Use InitOps – Deploy a Production-Ready WordPress Server with a Single Command

InitOps was created to solve exactly that problem. The entire WordPress production deployment process is almost fully automated. You only need a few minutes of interaction to get an optimized WordPress environment ready for Ubuntu 24.04 LTS.

Note: InitOps is best optimized for production environments using a single domain on a single VPS to ensure performance, stability, and maximum system resource utilization.

Step 1: Log in to VPS as Root

First, log in to your Ubuntu VPS via SSH:

ssh root@your-server-ip

InitOps requires root privileges to install and configure the entire system. If not run as root, the script will automatically stop.

Step 2: Run the InitOps Install Command

After successfully logging in to your VPS, run:

curl -sSL https://inithtml.com/initops/install.sh | bash

InitOps will automatically:

  • Update the system.
  • Install Python3 and Curl.
  • Download the Deployment Engine.
  • Check script syntax for errors.
  • Set execution permissions.
  • Launch the setup menu.

The entire process runs completely automatically.

Step 3: Select Deploy System

Once finished, the InitOps menu will appear:

[1] Deploy LEMP Stack & WordPress
[2] Re-apply Performance Optimizations
[3] Help & Tuning Paths
[4] Change Domain & Renew SSL
[5] Backup WordPress Database
[6] Server Monitor (Discord Webhook)
[7] Add New Website
[8] Configure DNS-01 SSL Auto-Renewal (Cloudflare)
[9] PHP Version Manager (Install / Switch 8.3 · 8.4 · 8.5)
[0] Exit

To start deploying a new WordPress website, select:

1

Step 4: Choose PHP Version and Enter Website Information

InitOps will ask you to select a PHP version:

[1] PHP 8.3 (security fixes only, EOL Dec 2027)
[2] PHP 8.4 (stable, recommended)
[3] PHP 8.5 (latest)

Then, enter your website information:

  1. Website domain.
  2. Database name.
  3. Table prefix.

Example:

-> Domain name: site.com
-> Database name: wp_production
-> Table prefix: wp_

Database User and Password will be automatically generated by the internal security mechanism to prevent structure exposure or brute force scanning.

Step 5: Let InitOps Deploy Automatically

After entering the information, InitOps will automatically install:

  • Nginx.
  • MariaDB (auto-hardened: removes anonymous users, test DB, disables remote root).
  • PHP 8.3/8.4/8.5 FPM.
  • Redis Server.
  • Fail2Ban.
  • Iptables Firewall.
  • WordPress.
  • WP-CLI.
  • Certbot SSL.

The system will also automatically:

  • Optimize Nginx based on RAM and CPU.
  • Optimize PHP-FPM (calculates max_children from actual remaining RAM).
  • Optimize MariaDB.
  • Configure OPcache per hardware profile (prevents cache overflow).
  • Configure Redis Unix Socket.
  • Set up System Cron for WordPress.
  • Apply Production security hardening.

Everything happens automatically without manually editing individual configuration files.

Step 6: Complete WordPress Installation

After deployment, InitOps will display:

  • Selected PHP Version.
  • Database Name.
  • Database User.
  • Database Password.
  • Table Prefix.
  • Web Root.

Please save this information carefully as the system will not display it a second time.

Step 7: Install SSL with Certbot (MANDATORY)

This step is extremely important.

Many people see the website running on HTTP and forget to install SSL. In reality, after running InitOps, you still need to activate HTTPS with Certbot for the website to operate in true Production standard.

After pointing your domain to the VPS, run:

certbot --nginx -d domain.com

If your website uses www as well:

certbot --nginx -d domain.com -d www.domain.com

InitOps has already pre-installed:

  • Certbot.
  • Python3 Certbot Nginx.

So you only need to run the command and SSL will be automatically configured into Nginx.

Then simply open your domain in a browser to complete the WordPress setup wizard.

Cloudflare Notes

If you use Cloudflare, remember:

  • Point your domain to the correct VPS IP first.
  • Keep the Cloudflare icon in grey cloud (DNS Only) status.

This is almost mandatory for Certbot SSL verification to succeed.

If you enable Cloudflare Proxy (orange cloud) too early, the Let’s Encrypt HTTP Challenge may fail because requests don’t go directly to the VPS.

Only re-enable Cloudflare Proxy after Certbot has completely finished installing SSL, if you need CDN or DDoS protection.

Additionally, InitOps supports switching to automatic SSL renewal via Cloudflare DNS (DNS-01 Challenge) using menu [8] — no port 80 required, no webroot dependency, works even when Nginx is offline.

How to Reopen InitOps Later

After the first installation, you don’t need to run the long curl command again.

Simply type:

initops

Anywhere in the terminal to reopen the admin menu.

What to Do After Upgrading VPS?

After upgrading RAM or CPU, reopen InitOps and select:

[2] Re-apply Performance Optimizations

InitOps will automatically rescan the new hardware configuration and re-optimize:

  • Nginx.
  • PHP-FPM (recalculates workers based on actual RAM).
  • MariaDB.
  • Redis.
  • OPcache for the new profile.

to take full advantage of your new VPS resources. The system also auto-detects the running PHP version (8.3/8.4/8.5) without manual edits.

How to Change Domain or Renew SSL

Select from the menu:

[4] Change Domain & Renew SSL

InitOps will automatically:

  • Update Nginx Vhost configuration.
  • Run Certbot to issue a new SSL certificate.
  • Perform Search & Replace on the entire Database using WP-CLI.
  • Update siteurl and home options.
  • Flush Redis Object Cache to prevent cache errors after migration.

The entire process is validated before reloading services, ensuring website stability during the transition.

How to Deploy Additional Websites on the Same VPS

Select from the menu:

[7] Add New Website

InitOps will automatically:

  • Create a separate database for the new website.
  • Assign a dedicated Redis DB index (auto-incremented from DB 1).
  • Create an isolated Nginx vhost.
  • Let you choose your own web root folder name.
  • Set up a separate System Cron for the new site.

This does not affect the primary website at /var/www/html.

How to Backup Database

Select from the menu:

[5] Backup WordPress Database

InitOps will automatically:

  • Export Database using WP-CLI.
  • Compress file with gzip to save disk space.
  • Automatically delete the original .sql file after compression.
  • Name file by Domain and Timestamp.
  • Clean up backups older than 30 days to prevent disk full.

Backup files are stored at:

/var/backups/wordpress

How to Monitor Server via Discord

Select from the menu:

[6] Server Monitor (Discord Webhook)

InitOps will automatically:

  • Detect hardware configuration and adjust monitoring interval accordingly (5–10 minutes).
  • Monitor 4 metrics: Disk, RAM, CPU, MySQL.
  • Send 🔴 red alert when thresholds are exceeded.
  • Send 🟢 green recovery notification when healthy.
  • Anti-spam: each alert fires only once until recovery occurs.
  • Full English — Vietnamese bilingual support for UI and Discord content.

Default alert thresholds: Disk >85%, RAM >90%, CPU >90%, MySQL not responding.

How to Switch PHP Versions

Select from the menu:

[9] PHP Version Manager (Install / Switch 8.3 · 8.4 · 8.5)

This feature allows you to:

  • Install additional PHP: Install multiple PHP branches (8.3, 8.4, 8.5) side-by-side — new versions are installed but not activated, consuming no RAM until switched.
  • Zero-downtime switch: Start the new PHP-FPM alongside the old one, update fastcgi_pass across all vhosts, validate Nginx, then stop the old FPM — your site never goes down.
  • Instant rollback: Old packages remain installed; a single menu action switches everything back instantly.
  • Auto-reapply tuning: Every switch regenerates pool config, runtime INI, and OPcache tuning based on the current hardware profile.
  • PHP CLI sync: Automatically updates update-alternatives so WP-CLI and cron jobs always run on the active PHP version.

Safe switch workflow:

  1. Generate InitOps tuning (pool + runtime + OPcache) for the new PHP branch.
  2. Validate PHP-FPM config before touching any live service.
  3. Start php[new]-fpm alongside php[old]-fpm (both sockets coexist).
  4. Rewrite fastcgi_pass in all vhosts, run nginx -t.
  5. If nginx -t fails → rollback all vhosts immediately, site never goes down.
  6. Only after nginx reloads successfully, stop and disable php[old]-fpm.

How to View Configuration Paths

Select:

[3] Help & Tuning Paths

This menu displays:

  • Nginx Config path.
  • PHP-FPM Pool path.
  • PHP Runtime INI path.
  • OPcache Tuning path.
  • MariaDB Tuning path.
  • Redis Config path.
  • WP Config path.
  • System Cron path.
  • Server Monitor Config path.

This area is for advanced fine-tuning after deployment is complete.

Note: To ensure all WordPress files and folders always have correct ownership after any manual configuration or editing, you should run:

chown -R www-data:www-data /var/www/html

This helps prevent unexpected permission issues during operation.

Conclusion

InitOps v1.9.0 transforms building a WordPress VPS from hours of manual configuration into just a few minutes of nearly fully automated interaction. With flexible support for PHP 8.3, 8.4, and 8.5, the ability to manage and switch PHP versions without downtime, multi-site deployment, real-time monitoring, and automatic SSL renewal via Cloudflare DNS, simply prepare a clean Ubuntu 24.04, run the correct command, and complete the Certbot SSL step — you’ll have an optimized, secure, and Production-ready WordPress environment.

Comments


  • No comments yet.

Web-Based Tools

Press Ctrl + \ on desktop, or swipe left anywhere on mobile.

Login