This is an optimization guide for wordpress using LS Server and LS Cache plugin in Wordpress.
LiteSpeed web server can not be installed on your end if yo you not have cPanel root privileges. Follow LSCache documentation for this, if you have root privileges.
To install requirements, first go to your Wordpress installation and add the LS Cache Plugin.
Go to WP-Admin → On the sidebar click on plugins → Add new → LiteSpeed Cache (Plugin should look like these)
Some providers show the option to check if LS Cache is properly enabled on their server. You will find the option in cPanel like the following image:
In this case click on LiteSpeed Web Cache Manager → Wordpress Cache → Scan Installation. This will show you the installations so you can enable LS Cache server on them, in most of the cases it is auto-enabled.
Click on Enable to make sure installation is working properly.
Getting to Work
Now it is time to get to work on the LSCache installation. This will help us a lot with image optimization, compression, thumbnails, CDN, etc.. But note that some of the features might break your website and will need additional tweaking. Depending on the plugins and Themes installed this might break the page. Please check and flush cache each time you make any significant change so that it is visible.
Suggestions: Enable automatic updates and notifications, so that the service runs as smooth as possible all the time. Go to Litespeed → General Settings → Automatically Upgrade → Enable . On that same page enable notifications and save it on the top right corer. Click on "Save Changes". You need to save changes each time you do a modification, as it will not be saved otherwise and your progress will be lost.
First things first, make a connection between quick.cloud and your domain. For this go to "General"→ Domain Key → Request Domain Key. You will se a notice informing you:
- Create an account at quick.cloud and link it. After the request has been approved, click on the button "Link quick.cloud"
- Go to "Cache" on the sidebar. You will see a notification if Litespeed web server is not installed, in this case, moving any setting here will render useless. Here you can enable all settings, as this will generally not generate an issue. Unless the site is very active in comments and has a lot of activity. In this case, you might see some delay in the comments being posted and being seen by other users.
- Go to TTL and place proper values for public and private cache. I would suggest you place both at the recommended values from Litespeed. 1 Week, unless you do not post much content or you post a lot of content. In this case, change values accordingly.
- On the Purge tab you will see options to auto-purge your wordpress installation as soon as new content is posted. Be aware that this might crash your site if you have a lot of visits and content, as the CPU usage will skyrocket. Making it slow or unresponsive for long periods of time if you continue editing over and over. For small to mid sites it is safe to enable them. You can also schedule a website purge each day at a specific time.
Enable "Server Stale" as this will:
- Next you have the ESI Tab, which is only useful if you need to optimize content for logged in users, generally it has no use if you have not many administrator users or you have a need for a high amount of users on your Wordpress installation.
- Object Cache tab. There you will need to have access to memcached or redis, which is not the case on many installs. So we will ignore it for now. If you want to read more about it, check it on LS Documentation.
- Browser Cache tab. This one should be enabled to reduce the amount of requests to the server. Just enable it and 1 year cache is good enough in this case, which is the default setting.
- Now go to CDN on the sidebar and enable quick.cloud or if you have another CDN, enable it. In this case we are focusing on quick.cloud CDN. For this just enable the setting and allow to load query remotely on google or cdnjs, it is your choice, both are equally as good. Afterwards make sure to enable it on your quic.cloud account. For this go to LiteSpeed Cache → General → quic.cloud dashboard → CDN → Enable. In case you are using Cloudflare, you will need to provide the server IP for this to work properly. You will have to change your CNAME on your domain for this to work, so if you have Cloudflare, you can stick with Cloudflare.
- Image Optimization. Here you should enable all but one setting, "Remove Original Backups" as this might create issues if files are not compressed to your liking.
- Page Optimization. Here is the tricky part, if you are new to this, you should hire someone to do it. Making changes in the page optimization requires expertise of the plugin compatibility and issues that can arise. You can safely enable
- CSS Minify
- CSS Combine
- CSS HTTP/2 Push
- For Enabling the rest you need to be very careful as this might break your page. This is basically trial and error, you can exclude some .css or .js that break the page, but this require advanced troubleshooting with additional tools and checks. For now just enable:
Your site might work apparently, but you need to delete cache in Litespeed on the admin bar at the top → click on LS Icon → purge All. Also make sure to purge all your cache on your browser. Otherwise you might not detect issues that arise from this kind of optimization.
- Same goes for JS Settings. Go to the JS Settings tab. Everything can be enabled safely except async, as this causes problems most of the time. In this case the setting is called "load js deferred"
- Do enable "Exclude Jquery" as this might help you with a lot of issues that might arise.
- On the optimization settings tab you might enable everything but
- CSS Inline and JS Inline, as this might cause the same issue as before. Some content might need to be loaded first.
- For DNS Prefetch control run your website on tools.pingdom.com and check for the most common dns requests. You can add them on the DNS Prefetch.
- Image Lazy loading in media settings is a great asset for getting better scores on google speed insights. Now, if the setting of "lazy load images" does not crash the site, it is safe to asume that all features will work except one. LQIP (Low Quality Image Placeholder), this might not work because it needs to be sent to quic.cloud for optimization. Sometimes this does not happen instantly and takes some time. So the website might break temporarily.
- Localization Settings does not break your site, you can enable it if it is useful to you.
- On the Tunning Settings you will be able to fix the css issues I commented before. You will be able to exclude files and images.
- Now go to database on the sidebar. There you can clean all the junk of your database and convert everything to innodb. This has minor impacts on small to mid websites. But you should enable it as it is pretty safe to do so. Make sure to backup your database just in case.
That is pretty much how to optimize your website with LS Cache. But note that you might need an expert to do it, as this requires a lot of experience with sites with a lot of plugins. We can do that for you at Hosterlabs.net for a price of 35$ for each website you want us to optimize. You can contact us at email@example.com . This is not an exact science and might require a lot of time for fine tuning. You might also not see much impacts in performance if the website was already pretty well optimized.