|

A faster WordPress site with Rocket-Nginx 3.0

We are proud to present Rocket-Nginx 3.0, the latest version of our advanced configuration to make the most of the combination between the Nginx web server and the WP Rocket caching plugin.

What is Rocket-Nginx?

Rocket-Nginx is an advanced configuration for Nginx to directly serve the caching files generated by WP Rocket.

Once you’ve edited the configuration file (which is optional), the tool generates a custom configuration adapted to your WordPress site to avoid triggering the start of WordPress.

It has the advantage of serving your web pages faster while reducing the resources usage on your web server. In the end, more speed and less web hosting costs!

Why Rocket-Nginx 3.0?

In version 1.0 of Rocket-Nginx, the configuration only had one file to include. No customization was possible.

With version 2.0, a configuration file was added to allow custom generation of the final configuration for Nginx.

Following the release of version 2.0, several users have made suggestions and noted technical problems that cannot be fixed simply. Version 3.0 therefore retains the principle used for version 2.0 remains, but some features have been added while technical limitations have been fixed.

Compatibility with version 1.x or 2.x

If you are using a previous version of Rocket-Nginx, it is important to note that Rocket-Nginx 3.0 is not compatible with versions 1.x or 2.x.

If your website uses version 1.x or 2.x, it is recommended that you set aside the past and redo your configuration from the beginning.

The beauty is that this step is very simple and usually takes less than 5 minutes. It is mainly for this reason that we have not been tempted to ensure backward compatibility with previous versions.

What’s new in version 3.0?

Generally speaking, version 3.0 brings more flexibility.

HSTS Removal

In version 2.0, it was decided to add a mandatory header to activate HSTS. Only a variable to change the expiration delay was accessible. With version 3.0, nothing is mandatory. You will need to add the desired rules via additional configuration files, if you deem it necessary.

Removing custom headers

The customization introduced in version 2.0 only allowed the addition of headers (via add_header in Nginx). However, the whole thing was incomplete in every sense of the word! First, the addition of headers did not allow to use the full power of the directive add_header. Second, it was a mistake to think that only the directive add_header would be part of the customizations desired by Rocket-Nginx users!

Managing Query strings

Although a query string usually means that the web page does not have to come from the cache, WP Rocket allows you to specify the query strings to consider during the caching process. Since version 3.0, Rocket-Nginx can also manage it!

You can first specify the query strings you want to use in the selection of the caching file generated by WP Rocket.

For example, the query string where we specify a country could always return the same content for a given country. It would be beneficial to cache the following page (this is not the case by default):

example.com/page/?country=canada

It is now possible!

Then, we can also specify the query strings that we want to ignore. This is the case for variables added by advertising services or certain social networks.

example.com/page/?fbclid=112h4g58hu48585hfh5

In the previous example, since there is a query string, the cached page would not be served. By asking Rocket-Nginx to ignore the parameter fbclid, the cached page can now be returned by Rocket-Nginx!

Including configuration files

It is now possible to include entire Nginx configuration files in all sections of the configuration generated by Rocket-Nginx (HTML, CSS, JS, Media).

Custom Expiration

With version 3.0, browser cache expiration delay can be set for CSS, JS, and media. In version 2.0, cache expiration delays were specified, but could not be changed.

Conclusion

If you use the advanced features offered by WP Rocket or want to have more flexibility with Nginx, version 3.0 of Rocket-Nginx will allow you to reach new heights!

To use Rocket-Nginx on your WordPress site using Nginx and WP Rocket, head over to GitHub for all the details.

Similar Posts

Leave a Reply

Your email address will not be published.