This article may contain affiliate links. If you buy some products using those links, I may receive monetary benefits. See affiliate disclosure here
There are several ways to get WordPress installed on a server. Manual installation is one of them, which involves manually setting up Nginx/Apache, MariaDB database server, PHP, downloading WordPress and then setting up the necessary configurations. Of course, this gives you the maximum control over the stack you install.
However, there can be ocassions when you don't want to do everything manually, but still want to setup a stack yourself on a fresh server/VPS instead of going for one-click installs or managed hosting.
That's where a cli-based server stack management tool can prove useful.
What is WordOps
WordOps is a command line tool that helps you setup and manage a webserver. With a single command, you can install whole stacks. No need to manually install Nginx, php-fpm, MariaDB etc one-by-one.
Watch the video
WordOps is forked from EasyEngine, another popular cli-based stack management tool.
WordOps can also handle other things like SSL installation and auto-renewal, server monitoring, etc. The software that can be installed with WordOps include:
- Netdata
- PhpMyAdmin
- PHP - v7.3 to v8.3
- MariaDB
- Nginx
- Redis
- WP CLI
- Composer
- eXtplorer file manager
- proftpd
- ngxblocker
- Fail2ban
and more...
To handle SSL issuing and renewal, WordOps uses acme.sh.
Types of sites supported
Not only WordPress, but WordOps also supports simple HTML, PHP, and PHP-MySQL sites.
Installing WordOps
Before beginning, ensure that you have:
- A fresh VPS or server without other software installed on the OS.
- Ubuntu, Debian, or Raspbian OS supported. As I am writing this, Ubuntu 22.04 LTS is the latest supported Ubuntu version.
Once I tried installing WordOps on a server that had MariaDB already installed. And it created conflicts and errors. So always ensure that you are with a fresh server.
This article assumes that you're running as the root user. Otherwise, prefix the commands with sudo
.
To install WordOps, you can run the following commands:
wget -qO wo wops.cc
The above command fetches the bash script from the url wops.cc and saves it to a file named wo
. The options -q
tells wget
to run quitely, without printing to the standard output. The -O
tells wget
to save the fetched result to a file.
Once it is fetched, run the wo
command:
bash wo
With that WordOps will be installed.
You can verify the installation by:
wo --version
How to install WordPress with WordOps
Suppose I want to install WordPress on a domain named coraltest.xyz
, with HTTPS support.
Before beginning, ensure that the domain name is pointed to the server's IP address. This is required to verify the domain's ownership to issue an SSL certificate. Otherwise, you can also use dns_challenge (available with Cloudflare and other popular DNS providers), but it requires additional steps like setting up an API token.
To setup a basic WordPress site with Let's Encrypt SSL certificate, I can run:
wo site create coraltest.xyz --wp -le
WordOps will also install the Nginx helper plugin.
If you want to use the WP Super Cache plugin:
wo site create coraltest.xyz --wpsc -le
Other caching options available include:
- Nginx Fastcgi Cache (use
--wpfc
option) - WP Rocket Cache (
--wprocket
) - Redis Cache (
--wpredis
) - Cache Enabler Plugin (
--wpce
)
This is basically what you need to get a WordPress site up and running. It's that simple. The above commands automatically install everything required to run WordPress.
However, that's not all. As I mentioned above, you can also create simpler things like PHP or even static HTML sites.
wo site create example.com --html -le
Or a php site:
wo site create example.com --php -le
Or you can install specific versions of PHP by replacing --php
with the specific versions.
As I am writing this article, WordOps supports --php83
, --php82
, --php81
, --php80
, --php74
, --php73
, --php72
.
By default, the --php
option installs the version specified in the /etc/wo/wo.conf
file.
Maintaining sites with WordOps
View a site
wo site info example.com
The output looks like:
Information about coraltest.xyz (domain):
Nginx configuration wp basic (enabled)
PHP Version 8.2
SSL enabled
SSL PROVIDER Lets Encrypt
SSL EXPIRY DATE 89
access_log /var/www/coraltest.xyz/logs/access.log
error_log /var/www/coraltest.xyz/logs/error.log
Webroot /var/www/coraltest.xyz
DB_NAME exampleFj8453l
DB_USER examplehhs5dlf96d
DB_PASS shevwse62342swe
View all sites
wo site list
Delete a site
wo site delete example.com
View the status of all installed software
wo stack status
The output looks like:
fail2ban is not installed
Netdata is not installed
UFW Firewall is disabled
nginx : Running
php8.2-fpm: Running
php8.3-fpm: Running
mariadb : Running
Installing and uninstalling software
Suppose you want to install Fail2ban:
wo stack install --fail2ban
To remove it:
wo stack remove --fail2ban
Upgrade all software:
wo stack upgrade
Upgrading a particular software
Upgrade a specific software, e.g., Nginx:
wo stack upgrade --nginx
System update
Upgrade all packages on the system:
wo maintenance
This is equivalent to performing a system update with apt update && apt dist-upgrade && apt autoremove --purge && apt autoclean
.
Conclusion
We discussed only the important features and options available with WordOps. WordOps also supports lot more options and commands, which we haven't covered.
For instance, you can easily switch PHP version of a PHP app with the update
command. If a site is currently using php8.2, you can update it to php8.3:
wo site update example.com --php83
You can even upgrade the site stack to a higher one. For instance, you can upgrade an PHP site to WordPress. However, the reverse is not possible - you cannot downgrade WordPress to PHP or lower.
Overall, WordOps is a good choice if you're looking for a simple command line tool to manage your servers.