Help Center
How to Integrate with LiteSpeed Cache
Introduction:
LiteSpeed Cache is a powerful caching plugin designed for WordPress, offering a range of features to improve site performance. Pairing it with Apto CDN can further boost your website’s load speed by serving static content from servers geographically closer to your users.
Prerequisites:
- Ensure LiteSpeed Cache is installed and activated on your WordPress site.
- Your Apto CDN account should be active and set up with an API key.
Step-by-Step Guide:
- Access LiteSpeed Cache Settings:
- Log in to your WordPress admin dashboard.
- Navigate to LiteSpeed Cache in the sidebar and click on CDN.
- Enable CDN Integration:
- In the CDN tab, toggle the option to Enable CDN.
- This action unlocks the fields needed to input your CDN settings.
- Configure the CDN URL:
- Enter your Apto CDN URL in the CDN URL field:
- CDN URL:
https://s1.aptocdn.com/{domain}/
- Replace
{domain}
with your actual domain (e.g.,https://s1.aptocdn.com/mywebsite.com/
).
- CDN URL:
- Enter your Apto CDN URL in the CDN URL field:
- Set Original URLs:
- Under Original URLs, add your website’s base URL (e.g.,
https://www.mywebsite.com
). This ensures that LiteSpeed Cache knows which URLs to replace with the CDN URL.
- Under Original URLs, add your website’s base URL (e.g.,
- Include Static File Types:
- Confirm that images, CSS, JavaScript and other static file types are included in the file types to be served through the CDN.
- This setting helps maximize the effectiveness of your CDN integration.
- Save Changes:
- Scroll down and click Save Changes to apply the new configuration.
- Purge Cache:
- Navigate to LiteSpeed Cache > Toolbox and click on Purge All. This step clears your site’s existing cache and ensures all new requests are served with the CDN configuration in place.
- Verify CDN Integration:
- Open your website and inspect a few pages using Developer Tools (right-click > Inspect > Network tab).
- Verify that the URLs for static assets (e.g., images, CSS, JavaScript) are being served from
https://s1.aptocdn.com/{domain}/
.
Troubleshooting Tips:
- Assets Not Served from CDN: Double-check your CDN URL and ensure it is correctly formatted without any typos.
- Mixed Content Warnings: Ensure that your CDN URL uses HTTPS if your site is secured with an SSL certificate.
- Specific Files Not Cached: Confirm that all relevant file types are included in the Include Static File Types field.