I wanted to test with an Openlitespeed web server with WordPress. I have tried it out and decided to keep the web server. I’ll briefly explain why and how you can install one too.

I regularly play with web servers and every now and then I come across something good. Something I say, this is a good thing. For example, I came across the free image of an Openlitespeed WordPress instance on Google Marketplace.

Free for life

The one click deployment of an Openlitespeed WordPress VM instance went so well that I decided to keep it. An f1 micro VM instance: 1 shared vCPU + 0.6 GB memory (f1-micro) is one of the free for life products of Google Cloud Platform as long as it is rolled out in a data center in the United States, except Virginia.

More information can be found on the always free products page of GCP. I will quote below what the website says about this specific product.

1 F1-micro instance per month

Scalable, high-performance virtual machines.

  • 1 f1-micro instance per month (US regions only—excluding Northern Virginia [us-east4])
  • 30 GB-months HDD
  • 5 GB-months snapshot in select regions
  • 1 GB network egress from North America to all region destinations per month (excluding China and Australia)

openlitespeed-wordpress

Litespeed technologies states the following quote on the image product page:

Blazing-fast WordPress with LSCache, 300+ times faster than regular WordPress. OpenLiteSpeed is the Open Source edition of LiteSpeed Web Server Enterprise and contains all of the essential features, including HTTP/3 support. OLS provides enormous scalability, and an accelerated hosting platform for WordPress. This solution gives you OpenLiteSpeed, PHP, MySQL Server, WordPress, LiteSpeed Cache, and other useful applications.

Install Openlitespeed web server with WordPress

Go to the GCP Marketplace and look for the openlitespeed-wordpress image, you can find it here: openlitespeed-wordpress

On the product page just click: LAUNCH

Configure your settings and make sure your on a free tier zone, all default settings should be fine. You can give your deployment a friendly name if you like.

Just click the button below that say “DEPLOY” to get started.

Getting started with Openlitespeed and WordPress

The only thing you should do is reserving a static ip address and point your domain DNS to your servers ip address with two A records, one for the root domain and one for www. You also need to open the port 7080, I recommend only opening it for your ip address in the servers firewall. If you open it, you should close it again. Use the commands below:

By default, WebAdmin uses port 7080. To allow access to 7080 from your IP(e.g. 1.2.3.4):

ufw allow from 1.2.3.4 to any port 7080

You can also allow all IPs access to port 7080:

ufw allow 7080

We suggest turning this port off once you’ve finished setup:

ufw delete allow 7080

For some commands you do not have permissions or should be root, i suggest you put “sudo” in front of your command.

To start you should login via ssh to the server and complete the setup wizard. If you want to skip it you can just press ctrl + z. It will popup each time you login until you finished it. I recommend you using the wizard, if not you will have to do most configuration like ssl manually.

Setup WordPress on Openlitespeed

Setup and configuration is easy, default configurations are already fine tuned out of the box and not much to do.

Go through the setup wizard if you log in via ssh, we assume that a domain name already refers to the servers ip address via DNS including an A record for www

Now visit the domain with a web browser and follow the steps to setup WordPress.

You can now login to the admin panel of wordpress.

Credentials to login to phpMyAdmin (ip.address/phpmyadmin) and the web admin interface (ip.address:7080) can be obtained via ssh, when you login there are always instructions which command to use. No need to write the passwords down, just copy and paste. The username is admin.

Configure LScache

There is really not much you can configure in the LScache plugin, right out of the box all defaults are fine. You may wish change object caching from memcached to redis.

By default Memcached is enabled. To switch to Redis is easy. Just copy the Redis socket path to LSCache Plugin > Settings > Advanced > Object Cache and save:

  • Memcached: /var/www/memcached.sock

  • Redis: /var/run/redis/redis-server.sock

How to FTP to your openlitespeed-wordpress web server?

Unfortunately with this image I have not found a safe way to enable this. It would be great if you could use your favorite (s)ftp client like FileZilla. The recommendation is using ftp via the ssl shell. However their quick start document states:

Method for Uploading Files
You can serve files from the web server by adding them to the web root using SFTP or other tools.

Their documentations refers to this guide: How To Use SFTP to Securely Transfer Files with a Remote Server

The simple way to sftp

Open a ssh console and choose to upload a file. By default the uploads are placed in your home directory

/home/%username%/

Go to your home directory to see the file and move it to the root of your websites folder.

sudo mv test.txt /home/cloudpanel/htdocs/hajhu.com/

If you want to rename a file you can simply use the same mv command.

sudo mv test.txt readme.txt

Sending mail

To send mail i did not configured postfix, we used the preinstalled WP MAIL SMTP plugin in combination with Gmail (G Suite) to send mail. Just start configuring the plugin and it will show you the way on how to make an API key for your websites mail. It really works great.

Conclusions and recommendations

installation and setup is very straight and easy, the web servers page speed and performance on a lightweight low end server is very good.

The f1 micro instance is just enough to have a simple wordpress site with a view visitors a day. On the moment of writing I am still testing the server. Web services already hung once, while ping still worked. I had to stop and start the server instance again.

I used an old domain with still having visitors so I have about 6 to 10 visitors a day. The only one using the website is myself doing design work and it works really smooth. I did got the performance alert but one can ignore it, unless you are really having lots of visitors and scale up.

Pagespeed is stunning with this micro instance and got awesome results from GTMetrix with normal pages with images loading consistently between 1 and 2 seconds with in average 1.6 seconds using the Divi theme.

This is a good, quick deployable solution that is secure and scalable. It is fine tuned out of the box, ready to use.

Relevant links and documents