If you are self-hosting your WordPress website on a VPS or dedicated server, setting up and managing a fully optimized WordPress website with SSL enabled on a LEMP stack is quite a challenge for beginners. But with Webinoly, this can be done in easily with just a few commands.
Webinoly is a CLI tool for creating and managing LEMP stack websites. It comes with Nginx, MariaDB and PHP7 as part of the stack. It also includes both Redis and Memcached for object caching, Let’s Encrypt for SSL certificates, Postfix for sending emails, PhpMyAdmin for managing MariaDB databases and Duplicity for backups.
So off the bat, you get all the optimizations you would expect from a fast and performant WordPress website plus tools to help you with server administration:
- Free SSL certificates via Let’s Encrypt with automatic renewal.
- HTTP/2 and gzip enabled Nginx server with PHP v7.3.
- Nginx FastCGI page caching and Redis for object caching.
- Real-time log viewer.
- PhpMyAdmin with HTTP auth.
- A VPS or dedicated server with root access.
- Ubuntu 16.04 LTS or 18.04 LTS.
Webinoly requires root access so it will not work on shared hosting. In this guide, we will be using a VPS from UpCloud and Ubuntu 18.04 LTS.
Install and setup Webinoly
First thing first, you need to open a few ports in order for Webinoly to work properly:
- 22/TCP (Inbound/Outbound) for SSH.
- 25/TCP or 587/TCP (Outbound) for SMTP.
- 80/TCP (Inbound/Outbound) for HTTP.
- 443/TCP (Inbound/Outbound) for HTTPS.
- 11371/TCP (Outbound) for GPG key server.
- 22222/TCP (Inbound) for Webinoly admin tools.
Also make sure your DNS is configured and your domain is pointed to your server’s IP address.
Once that is done, SSH into your server
wget -qO weby qrok.es/wy && sudo bash weby 3
This will install all the required packages and software and configure them automatically for you. This will take a few minutes so sit back and relax.
Once the installation is complete, you will be provided with the
Next, we will need to create HTTP auth credential, which Webinoly uses to protect WordPress admin or login pages with a basic HTTP authentication as an additional layer of security:
sudo httpauth -add
This means that every time when you want to login to the admin dashboard of your WordPress website, you will need to enter this credential on top of your WordPress login.
You can disable this by turning it off using this command:
sudo httpauth -wp-admin=off
Create and configure WordPress website
Next up, time to create your WordPress website by simply running this command:
sudo site example.com -wp -cache=on
Now go to your website URL to continue with the WordPress installation.
Create Let’s Encrypt SSL certificate
Gone are the days where we need to pay for SSL certificates. With Let’s Encrypt, it’s free and super easy to configure via Webinoly. Just run:
sudo site example.com -ssl=on
This will create all the necessary certificates and automatically configure it for you without needing to manually edit your Nginx configuration. It also automates the renewal process by creating the cronjob.
If you are setting up your WordPress website on your main domain,
This is not ideal for SEO. You are fine with either one but not both. So you have to configure redirection to tell Google
If you want URL
example.com to redirect to
sudo site example.com -force-redirect=www
And if you want your
www.domain.com to redirect to
sudo site example.com -force-redirect=root
Webinoly will add the appropriate redirection configuration to your Nginx config file.
Enable SFTP access
This is not a must have but if you need to access to your WordPress directory via FTP to upload files, etc, you need to enable SFTP access.
sudo webinoly -login-www-data=on
Then we need to set a password for
Now you can SFTP into your server using as
www-data with the password you have just set.
Activate and configure WordPress caching plugins
Now, login to your WordPress admin dashboard and activate both Nginx Helper and Redis Object Cache plugins, which comes preinstalled when you create your WordPress website via Webinoly.
Go to Nginx Helper plugin settings and enable purge by checking the “Enable Purge” checkbox. Make sure you select “nginx Fastcgi cache” as the caching method and “Delete local server cache files” as the purge method.
Go to Redis Object Cache plugin settings and enable object cache.
As you can see, with just a few commands, you can install, configure and manage a fully optimized, SSL-enabled WordPress website easily with Webinoly. There are so much more commands and features that Webinoly offers that we are not able to cover in this guide. So do check out their documentation for more details.
For the record, Webinoly is not the only tool out there. There are tools like EasyEngine and Centmin Mod (for CentOS) that provide the same solution for the same problem. But having tried EasyEngine, we feel that Webinoly is much easier and straight forward, especially for beginners.
Let us know in the comment section below if you have any questions about this guide or Webinoly in general.