WordOps to manage WordPress VPS

Last Revised: October 2, 2021

If we have WP-CLI that allows us to completely manage everything around WordPress, once installed, we have WordOps as a tool for managing the creation and maintenance of WordPress sites in an unmanaged system.

In this case, if you have a server with Ubuntu or Debian, but every time you have to create a WordPress it is uphill, with this system you can mount the entire system easily, in addition to creating, updating and maintaining everything with a series of commands as if it were WP-CLI.

WordOps provide the ability to deploy a blazing fast and secured WordPress with Nginx by using simple and easy to remember commands. Forked from EasyEngine v3, it’s already much more than an up-to-date version of EEv3 with several new features including Let’s Encrypt wildcard SSL certificates with DNS API validation support, Linux kernel optimizations or a new custom Nginx package with TLS v1.3 and Cloudflare HTTP/2 HPACK support.

WordOps

This tutorial has been created on a Clouding.io VPS. You can create your own VPS from 3€/month.

In addition, you have the possibility to create your VPS with the WordPress image in one click.

PARTNERSHIP

Requirements

Recommended Operating System

  • Ubuntu 20
  • Ubuntu 18

Supported Operating System

  • Ubuntu 16
  • Debian 10
  • Debian 9

The example of this tutorial is with Ubuntu 20.

Installation

Once the operating system is installed, the first thing we will configure will be the server time. In this case we will configure the universal time zone.

timedatectl set-timezone 'UTC'
timedatectl set-ntp on

The next thing we will do is check the version of the operating system and, subsequently, make a complete update of it.

lsb_release -a
apt -y update && apt -y upgrade && apt -y dist-upgrade && apt -y autoremove
snap install canonical-livepatch

Now that we have everything up to date, we will install WordOps.

cd
wget -qO wo wops.cc && sudo bash wo

This execution will return the result of the installation. In general it is not very fast, so be patient.

Welcome to WordOps install/update script v3.13.2
Installing wo dependencies      [OK]
Installing WordOps      [OK]
Running post-install steps      [OK]
WordOps (wo) require an username & and an email address to configure Git (used to save server configurations)
Your informations will ONLY be stored locally
Enter your name:
Enter your email:
Synchronizing wo database, please wait…
WordOps (wo) installed successfully

To enable bash-completion, just use the command:
bash -l

To install WordOps recommended stacks, you can use the command:
wo stack install

To create a first WordPress site, you can use the command:
wo site create site.tld --wp

Once the installation is finished, we will validate that it works by doing a software update.

wo update

We can activate the auto auto complete, so that using the tab key you can complete the functions, or show us the list of available options.

source /etc/bash_completion.d/wo_auto.rc

Before creating any site, we will make a first load of all the basic components that we are going to use, the initial stack . To do this we will run the base installation.

wo stack install

That installs a list of services to have them prepared.

WP-CLI is already installed
Start : wo-kernel [OK]
Adding repository for MySQL, please wait…
Adding repository for NGINX, please wait…
Adding repository for PHP, please wait…
Updating apt-cache              [OK]
Installing APT packages         [OK]
Applying Nginx configuration templates
Testing Nginx configuration     [OK]
Restarting Nginx                [OK]
Testing Nginx configuration     [OK]
Restarting Nginx                [OK]
Configuring php7.3-fpm
Restarting php7.3-fpm           [OK]
Tuning MySQL configuration      [OK]
Restarting mysql                [OK]
Restarting fail2ban             [OK]
Configuring Fail2Ban
Configuring Sendmail            [OK]
Downloading PHPMyAdmin           [Done]
Downloading phpRedisAdmin        [Done]
Downloading Composer             [Done]
Downloading Adminer              [Done]
Downloading Adminer theme        [Done]
Downloading MySQLTuner           [Done]
Downloading Netdata              [Done]
Downloading WordOps Dashboard    [Done]
Downloading eXtplorer            [Done]
Downloading cheat.sh             [Done]
Downloading bash_completion      [Done]
Downloading clean.php            [Done]
Downloading opcache.php          [Done]
Downloading Opgui                [Done]
Downloading OCP.php              [Done]
Downloading Webgrind             [Done]
Downloading pt-query-advisor     [Done]
Downloading Anemometer           [Done]
Installing composer             [OK]
Installing Netdata              [OK]
Restarting netdata              [OK]
Configuring packages            [OK]
HTTP Auth User Name: 
HTTP Auth Password : 
WordOps backend is available on https://IP_ADDRESS:22222/
Successfully installed packages

There are some options that we can use if we see them necessary, such as changing from MySQL to MariaDB.

wo stack migrate --mariadb

Or install PHP 7.4

wo stack install --php74

All stack commands are available in its documentation.

We can see the versions and everything installed by making a call to your information system.

wo info

That it will return to us the version information of the different services.

NGINX (1.18.0):

user                             www-data
worker_processes                 auto
worker_connections               50000
keepalive_timeout                8
fastcgi_read_timeout             300
client_max_body_size             100m
allow                            127.0.0.1 ::1

PHP 7.2 is not installed

PHP (7.3.24-3):

user
expose_php                       Off
memory_limit                     128M
post_max_size                    100M
upload_max_filesize              100M
max_execution_time               300

Information about www.conf

ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  1500
pm.max_children                  50
pm.start_servers                 10
pm.min_spare_servers             5
pm.max_spare_servers             15
request_terminate_timeout        300
xdebug.profiler_enable_trigger   off
listen                           php73-fpm.sock

Information about debug.conf

ping.path                        /ping
pm.status_path                   /status
process_manager                  ondemand
pm.max_requests                  1500
pm.max_children                  50
pm.start_servers                 10
pm.min_spare_servers             5
pm.max_spare_servers             15
request_terminate_timeout        300
xdebug.profiler_enable_trigger   on
listen                           127.0.0.1:9173

MySQL (10.5.8-MariaDB) on localhost:

port                             3306
wait_timeout                     60
interactive_timeout              28800
max_used_connections             2
datadir                          /var/lib/mysql/
socket                           /var/run/mysqld/mysqld.sock
my.cnf [PATH]                    /etc/mysql/conf.d/my.cnf

WordOps Dashboard

At the end of the installation of the stack we will see the username and password to access the WordOps information panel. It is accessed by port 22222, so we must have it accessible if we have any type of firewall.

https://IP_ADDRESS:22222/

If we want to have a panel or site through which to enter with our domain, we can create the certificate with Let’s Encrypt. To do this we must create a site (without content).

wo site create example.com -le

From this moment we can access through the domain itself.

https://example.com:22222/

In case of not remembering the password, not having pointed it during the installation or wanting to change the data, we can request a change in the security.

wo secure --auth

In any case, we can change the access settings to the Backend according to your documentation.

Creating a WordPress Site

Simple creation

Now that we have the whole system up to date, let’s create our first website. In this case we are going to create a site with the domain (which would automatically work with the www) and with a TLS certificate from Let’s Encrypt so that it works safely.

wo site create example.com --wp --letsencrypt --hsts

It will return to us the information of all the steps you have followed for the creation of the site.

Running pre-update checks       [OK]
Setting up NGINX configuration  [Done]
Setting up webroot              [Done]
Downloading WordPress           [Done]
Setting up database             [Done]
Configuring WordPress           [OK]
Installing WordPress            [OK]
Installing plugin nginx-helper  [OK]
Testing Nginx configuration     [OK]
Reloading Nginx                 [OK]
WordPress admin user : 
WordPress admin password : 
Successfully created site http://example.com
Certificate type : domain
Validation mode : Webroot challenge
Issuing SSL cert with acme.sh   [OK]
Deploying SSL cert              [OK]
Securing WordOps backend with current cert
Adding HTTPS redirection        [OK]
Updating site url with https    [OK]
Testing Nginx configuration     [OK]
Reloading Nginx                 [OK]
Congratulations! Successfully Configured SSL on https://example.com

Here you will return the access data (username and password) to access our WordPress.

The site data will be in the folders that the system creates by default for each site.

Site files              /var/www/example.com/htdocs
wp-config.php           /var/www/example.com/wp-config.php
Additional Nginx conf   /var/www/example.com/conf/nginx/
Site access/error logs  /var/www/example.com/logs

Although we always have the option to retrieve the information from that site by making a request.

wo site info example.com

It will give us information about the type of installation applied, PHP version, paths, status of the TLS certificate and users and passwords of the database.

Information about example.com (domain):

Nginx configuration      wp basic (enabled)
PHP Version              7.3

SSL                      enabled
SSL PROVIDER             Lets Encrypt
SSL EXPIRY DATE          89

access_log               /var/www/example.com/logs/access.log
error_log                /var/www/example.com/logs/error.log
Webroot                  /var/www/example.com

DB_NAME                  example
DB_USER                  example
DB_PASS                  example

Advanced creation

Although we can create the site as the system proposes, we can adapt the configuration a little to tell you what parameters we want.

In this case we are going to tell you to install a WordPress --wp, to do it with PHP 7.4 --php74 and add the TLS certificate with Let’s Encrypt --letsencrypt, to install the cache configuration with Redis --wpredis and the Super Cache --wpscplugin. In addition, we will give you the username --user=admin, mail --email=wordpress@example.com and password --pass=password that we want for the installation.

wo site create example.com --wp --php74 --letsencrypt --hsts --wpredis --wpsc --user=admin --email=wordpress@example.com --pass=password

It will return to us the information of all the steps you have followed for the creation of the site.

Adding repository for Redis, please wait…
Updating apt-cache              [OK]
Installing APT packages         [OK]
Tuning Redis configuration      [OK]
Restarting redis-server         [OK]
Running pre-update checks       [OK]
Setting up NGINX configuration  [Done]
Setting up webroot              [Done]
Downloading WordPress           [Done]
Setting up database             [Done]
Configuring WordPress           [OK]
Installing WordPress            [OK]
Installing plugin nginx-helper  [OK]
Setting plugin nginx-helper     [OK]
Installing plugin redis-cache   [OK]
Testing Nginx configuration     [OK]
Reloading Nginx                 [OK]
WordPress admin user : 
WordPress admin password : 
Configure redis-cache:  http://example.com/wp-admin/options-general.php?page=redis-cache
Object Cache:           Enable
Successfully created site http://example.com
Certificate type : subdomain
Validation mode : Webroot challenge
Issuing SSL cert with acme.sh   [OK]
Deploying SSL cert              [OK]
Adding HTTPS redirection        [OK]
Updating site url with https    [OK]
Testing Nginx configuration     [OK]
Reloading Nginx                 [OK]
Congratulations! Successfully Configured SSL on https://example.com

Creation, without WordPress

It is possible that in some case we need to mount absolutely everything, except the WordPress itself, because we are going to migrate it from some other site.

In this case, we can make a call for you to create the entire system and the VirtualHost, but not to do the installation.

wo site create example.com --wp --vhostonly --letsencrypt

Managing the site

There are many options when it comes to updating the configuration of a site.

For example we can change the PHP version (in this case upload it from PHP 7.3 to PHP 7.4).

wo site update example.com --php74

Full list of sites

wo site list

Turn a site on or off

wo site disable example.com
wo site enable example.com

Delete a site

wo site delete

Access the files of a site

wo site cd example.com

More options

Once the sites are created, there are a thousand options that we may need or consider. Some of the most common are the following.

Creating a MultiSite WordPress

In this case we have two options… if we want to configure it through subdomains…

wo site create example.com --wp --wpsubdom

… or with folders.

wo site create example.com --wp --wpsubdir

Server maintenance

wo maintenance

More information in the documentation.

Flush the cache

wo clean --all

More information in the documentation.

FTP access

Although there is still no simple way to set up FTP accounts, WordOps allows easy installation of ProFTPd and a couple of commands for access configuration.

First we will activate the FTP service.

wo stack install --proftpd

Later we will create the user so that he has access to his file folder.

adduser --home /var/www/example.com/htdocs/ --shell /bin/false --ingroup www-data example

And finally we will give permissions to the user so that he can modify the files.

chmod -R g+rw /var/www/example.com/htdocs

About this document

This document is regulated by the EUPL v1.2 license, published in WP SysAdmin and created by Javier Casares. Please, if you use this content in your website, your presentation or any material you distribute, remember to mention this site or its author, and having to put the material you create under EUPL license.