Category Archives: Optimization

Improving WordPress .htaccess – optimize WP’s 404 response

wordpress_404_page

WordPress has a 404.php template that’s generated for not found posts/pages. That’s fine, but what happens if post contains an image that’s deleted or moved from your blog or just path is set incorrect? It will output this 404.php template to the browser that’s actually doubles the traffic for a single page (for every not found object it will multiply traffic/load for every page)! Also, some bot’s request some strange urls never existed on your site that also slows down the server. To fix that I recommend to add elegant rules to WP’s .htaccess file: