Rate this article :
This article was useful to you ?
Yes
No
Vous avez noté 0 étoile(s)
Procédure
Cloudflare is a company offering various services on the Internet in terms of security, data protection and, above all, CDN (Content Delivery Network), a system responsible for delivering content from its servers to users.
The way a CDN works is simple: when a site is requested for the first time, it is stored on the CDN server, in this case Cloudflare, and then shared with all the other CDN servers (Cloudflare) in the world.
From then on, any user wishing to access this site will receive a copy from the nearest server instead of making a request to the site directly, whose servers could be on the other side of the world.
In this way, it takes less time for the request to be processed, significantly improving performance. What's more, since it's no longer the site that manages the requests but the CDN, bandwidth usage is reduced.
These reasons alone are enough to explain why so many sites put their trust in Cloudflare, but it still has an ace up its sleeve: as all requests pass through Cloudflare first, it can block DDoS-type attacks or even malicious IPs trying to access your site. It therefore provides an initial layer of security against the various attacks that could affect your site.
If you're using Cloudflare and LWS Optimize on your site to improve performance, it's important to activate the Cloudflare integration option so that the two services are synchronised and compatible.
LWS Optimize offers a dynamic cache (LWS Cache) and CSS/JS minification options, which conflict with Cloudflare, which also offers minification and its own cache. To avoid these conflicts, the integration will deactivate certain options in the extension.
To activate this integration, go to the extension's settings, then to the "CDN" tab. Here, check the "Cloudflare integration with LWS Optimize'" box. In the window that appears, enter your Cloudflare API Token. To create a token, you'll need to go to your Cloudflare account.
To create an API token, go to https://dash.cloudflare.com/ and log in to your Cloudflare account.
Then click on the icon at the top right and then on "My profile" to access your profile.
From here, click on "API Tokens" in the left-hand menu to open the Tokens page.
On the page, click on the "Create a token" button:
Finally, in the list of token templates, find "WordPress" and click on the "Use a template" button.
The configuration that is now displayed has been pre-filled for you, with the exception of the "TTL" field, which allows you to define the time for which the token will be valid. Start it at today's date and choose the token's expiry date. You can make it expire in several years if you don't want to repeat the operation frequently.
Click on the "Continue to summary" button to obtain a summary of the token's contents.
Finally, click on "Create a token" to complete the creation of the token.
Once the token has been created, copy it and keep it safe: if you lose it and need it later, you will need to recreate a new token.
If you know how to use a command terminal, you can copy the command displayed on the page to test your token. If it works, you should be able to read "This API Token is valid and active" in the command returns.
Back on the Cloudflare integration window, enter your newly created token in the field and proceed to the next step.
On the next page, you can choose whether or not to disable CSS/JS minification so as not to create conflicts with Cloudflare, which also offers these services. The dynamic cache (LWS Cache) must be deactivated in favour of Cloudflare's cache.
Make your choice and go on to the next step.
On the next page you can change the lifetime of the Cloudflare cache. You can change this so that the cache is emptied at the most opportune moment, for example at the same time as the LWS Optimize file cache purge. This will prevent the caches from being flushed incorrectly and your site from displaying the wrong versions of pages.
The last step asks you to confirm your choices. Click on the "Finish" button to apply the changes and activate the integration.
Now that the Cloudflare integration is activated, during an automatic cache purge (if enabled), the Cloudflare cache will also be deleted so that your visitors can see the most recent data.
You now understand the benefits of Cloudflare for the performance and security of your site and know how to :
Thanks to these steps, your site should benefit from a significant improvement in terms of loading speed and security, while offering you simplified management of caches and resources. 😊🌐
We hope this article has been helpful and provided you with all the information you need to get the most out of Cloudflare and LWS Optimize. Thank you for reading and please feel free to share your experiences or ask any questions you may have by leaving a comment below. Your feedback is valuable to us! 👍💬
Rate this article :
This article was useful to you ?
Yes
No
2mn reading
How do I install the LWS affiliate plugin on WordPress?
3mn reading
How do I install the LWS SMS plugin for WooCommerce on WordPress?
0mn reading
How do I clean my WordPress site with LWS Cleaner?
0mn reading
How can LWS tools make managing WordPress easier?