Optimal WordPress Setup with WordOps & Caching

Running your own server can be time consuming and difficult. If you are just starting your blogging journey then I highly recommend that you begin with BlueHost. It took me several years before I was comfortable enough to move some of my sites off onto their own servers, and it is by no means required for most websites or blogs anyway. If you aren’t sure whether you need either BlueHost hosting or your own server, you probably just need BlueHost. As always, if you have any questions, then please email me.

If you followed my server setup guide then your new server should be secure and ready for WordOps and WordPress to be installed.

Before we dive into the steps though, what is WordOps exactly?

WordOps is a toolset for your server that lets you deploy and manage WordPress installations (ie sites) that are secure, optimized and blazing fast. It will install Nginx and configure it correctly for you. Nginx is your web serving software that will actually deliver/serve/show your website to your visitors.

WordOps also installs MariaDB which is where all your posts (well, the text anyway) will be stored. It’s a database based on MySQL, which you may have heard of.

Finally, WordOps also installs and automatically sets up multiple cache backends and will let you easily obtain an SSL certificate for your domain (see the padlock next to “hostt.com” in your browser address bar?) which means that all data exchanged between you and the website is encrypted.

On top of this, WordOps can also install a bunch of optional software (server monitoring, firewalls, etc).

By now you must be thinking that all this sounds pretty complicated right? I am not going to lie and will admit that the underlying software is complex, however WordOps makes it fairly easy to setup and use – you can be up and running with just one or two commands (which are themselves very intuitive) in as little as five minutes.

Read on and see what I mean.

Installing WordOps

Where we’d left in my previous guide you had just finished defining the default root email and were otherwise all secure and ready to go. So let’s install WordOps now. Just enter the following in your shell prompt:

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

You’ll need to enter your name and email during the installation, which should take around five minutes. The name will become the default admin username for the WordPress sites you create and the email will be the default admin email.

Other than that, you’re done! It really is that easy. So, let’s make a WordPress site.

Create Your WordPress Site

For the purposes of this example let’s assume that your website will be located at www.hostt.com. I’m also going to assume that you’ve already pointed your domain to the server (if you haven’t, see this guide). N

To setup your WordPress site all you need to type is the following:

wo site create hostt.com --wpfc --php74 -le

As you’ll soon see, everything required to get your blog up and running will be installed and configured for you automatically with that single command.

You can now go ahead and access your brand new WordPress site using the details you see from the output:

WordPress admin user : xxxx
WordPress admin password : xxxx

Put a “/wp-admin/” onto the end of your domain, so that it would become hostt.com/wp-admin/ for example, and paste that into a browser. You should get a prompt asking you to login as below. Simply enter your admin username and password and you’re in!

The WordPress login screen

Change WordOps Tools Port

There’s one last thing to do. Head back here and remind yourself about the following lines:

# Allow incoming WordOps Tools
-A INPUT -p tcp --dport 31837 -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp --sport 31837 -m state --state ESTABLISHED -j ACCEPT

# Allow outgoing WordOps Tools
-A OUTPUT -p tcp --dport 31837 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp --sport 31837 -m state --state ESTABLISHED -j ACCEPT

WordOps comes with a suite of tools, called WordOps tools, some of which we might want to use at a later stage (like phpMyAdmin, which lets you edit databases in a graphical user interface (GUI)).

The default port of WordOps tools is 22222, we are going to change that to the port we opened in our Iptables firewall though. In the example above, that port is 31837. Run these commands:

wo secure --port 31837

wo secure --auth

The first command changes the port that we use to access the tools, the second changes the username and password that we’ll need to enter in order to use them.

If you want to take a look now, you can head to https://[your-server-ip]:31837/ or https://[your-domain.com]:31837/ using your browser and login. There won’t be much to see just now though – we’ll run over the different tools that are available within WordOps in another article.

For now, since you are up and running, just make sure that you follow my weekly server maintenance routine.

Categorized as Hosting

By Sean Robinson

My name is Sean Robinson and I’ve been building and running my own blogs and websites since 2004, and have been doing it full-time for over a decade. If you'd like to know more about my story, please click here.

Leave a comment

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