End of WP Engine support for .htaccess


Managed WordPress hosting provider WP Engine has announced that it is ending support for .htaccess directives. WP Engine has launched end-of-life (EOL) processes to end the use of .htaccess on their servers and set a date of October 2022 for full removal of support.

The use of .htaccess as a website management tool is so deeply rooted that the idea of ​​no longer supporting .htaccess may seem like a deal breaker. Some may rightly think that if customers can’t have a custom .htaccess, the web hosting service might not suit the way modern sites are built.

But a closer look at what WP Engine does shows that the decision makes sense, and more surprisingly, it could be a common feature of high-performance web hosting in the future.

Why WP Engine is deprecating .htaccess support

The reasons given by WP Engine for deprecating .htaccess were to achieve performance gains by removing .htaccess from the site level and also to be able to take advantage of performance gains from newer technologies.

The announcement stated:

“WP Engine will deprecate the .htaccess file to increase website performance and match industry trends.

If your site uses custom .htaccess directives outside of the default WordPress rules, we’ve put together a list of recommended alternatives.

WP Engine believes that this change will not affect most of the websites it currently hosts, as most sites only use the default version of .htaccess generated by WordPress.

“According to our analysis, most WP Engine websites will not require any additional changes to the .htaccess as they use a default WordPress version of this file.
Default WordPress rewrites will be handled automatically by WP Engine at the server level.

.htaccess and site performance

.htaccess is a way to control certain aspects of a website, such as redirecting a request from one URL to another URL, redirecting requests from insecure HTTP URLs to secure HTTPs, and blocking addresses IP of malicious hackers and scrapers, among many other uses.

.htaccess is a file used on servers that run open-source Apache server software (as well as, for example, Nginx servers that run as a reverse proxy for Apache).

Using .htaccess files is a long-established practice for managing websites.

However, something that may not be commonly considered or discussed is that using .htaccess files is not an effective way to handle activities such as IP address blocking or URL redirection.

When .htaccess files grow very large, they can negatively impact SEO and conversion-related metrics such as Time to First Byte (TTFB), a metric that measures how long it takes a server to start downloading resources from the web page.

According to a review by StrategiQ who quantified the impact of .htaccess on performance, they found that .htaccess files can impact both server performance and scalability.

What they discovered was that a large .htaccess file had a measurable and significant impact on CPU usage. Testing also revealed that a .htaccess file with as little as 1,000 lines could have a “significant” impact on server memory usage.

They noted that the added pressure was not enough to bring the website down as the server still had enough resources to handle the pressure.

“It’s worth noting though that in our tests, we didn’t see any huge impact on overall page load time, except for the 50,000 line file. This is likely because, even though significant resources were being used to process requests, we were still not reaching the maximum capacity.

Still, one can imagine that a server with multiple websites with large .htaccess files could impact the server.

Second, what may come as a surprise to many is that according to the official Apache Software Foundation (the developers of the Apache server software that runs .htaccess), the only time .htaccess files should be used is when the access to the server The configuration file is restricted, as can be found on budget shared servers.

Apache Software Foundation Documentation advise:

“There is, for example, a common misconception that user authentication should always be done in .htaccess files and, in recent years, another common misconception that mod_rewrite directives should go in .htaccess files.

It just isn’t.

You can place user authentication configurations in the main server configuration, and that is, in fact, the preferred way of doing things. Similarly, mod_rewrite directives work better, in many ways, in the main server configuration.

What WP Engine offers is actually a best practice according to the Apache documentation and in the short and long term it will benefit their user base by creating an environment that can make their websites faster which helps sales, ad clicks and has a small SEO advantage.

Will WP Engine users be inconvenienced?

WP Engine offers ways to circumvent the use of .htaccess files using what they call Web rules. Web rules allow users to manage IP-based allow/deny rules and set header responses.

Redirects can be applied in three ways within the WP Engine managed hosting platform:

  1. Bulk import into WP Engine Nginx configuration
  2. Bulk import into a WordPress plugin called Redirection
  3. Bulk Import in Yoast SEO Plugin Redirect Manager

I use the WordPress Redirect plugin on some of my websites and found it to be an easy way to manage redirects and headers.

The plugin also has a handy log file that shows you visits that result in 404 responses that can alert you to misspelled inbound links (which can be fixed by creating a redirect for the misspelled URL to the correct URL) .

WP Engine End of Life (EOL) process for .htaccess

Although at first it might seem like a drastic idea to end support for .htaccess, given how the Apache Software Foundation itself recommends against using .htaccess at the website level, l he approach taken by WP Engine makes a lot of sense.

There are obvious benefits for their users and for website visitors as well.

Will other hosts follow their example?


Read the WP Engine Announcement

Deprecation of .htaccess and alternatives

Read the Apache Software Foundation’s guidance on .htaccess

When (not) to use .htaccess files

WP Engine Web Rules

Redirects on WP Engine

Source link


Comments are closed.