Don’t use redirection plugins

One of the most common causes of performance issues, is any plugin which provides redirection capability:

  • Redirection
  • MathRank
  • Yoast

Using a redirection plugin on WordPress can slow down your site and provide a solution by manually adding redirects to the .htaccess file.

Note: if a plugin provides redirect capability (like MathRank) but you don’t use it, then you shouldn’t have a performance problem.

Why Redirection Plugins Can Slow Down Your Site

  1. Database Queries: Redirection plugins often rely on database queries to manage and process redirects. As your site grows, the database can become congested with numerous entries, leading to slower response times. Each time a user accesses a page, the plugin must query the database to check for any redirection rules.
  2. Script Execution Overhead: Redirection plugins usually execute scripts and code to handle redirect rules. These scripts may introduce additional processing time, especially if they are not optimised for performance. The more redirects you have, the more scripts the plugin needs to process, potentially slowing down your site.
  3. Plugin Configuration Overhead: Some redirection plugins come with extensive configuration options, allowing users to customise redirects based on various criteria. While this flexibility is beneficial, it can also introduce complexity and additional overhead, especially if the plugin is not configured efficiently.

Adding Redirects to the .htaccess File Manually

Instead of relying on a redirection plugin, you can manually manage redirects by editing the .htaccess file. This method is efficient and reduces the reliance on database queries and plugin execution. Follow these steps to add redirects directly to the .htaccess file:

  1. Access Your Website’s .htaccess File: Use an FTP client or the file manager provided by your hosting provider to locate and access the .htaccess file in the root directory of your WordPress installation.
  2. Backup Your .htaccess File: Before making any changes, create a backup of your .htaccess file. This ensures that you can easily revert to the previous state if something goes wrong.
  3. Manually Add Redirect Rules: Use the following syntax to add redirect rules to your .htaccess file:
Redirect 301 /old-page/ http://www.example.com/new-page/
  1. Replace /old-page/ with the old URL path and http://www.example.com/new-page/ with the new destination URL.
  2. Test Your Redirects: After adding the redirect rules, test them by accessing the old URLs in your browser. Ensure that the redirection occurs as expected.
  3. Monitor Performance: Monitor your site’s performance using tools like Google PageSpeed Insights or GTmetrix. Manually managing redirects in the .htaccess file should result in improved site speed.

Conclusion:

By understanding the potential drawbacks of using redirection plugins on WordPress, you can take control of your site’s performance. Manually adding redirects to the .htaccess file offers a streamlined and efficient solution, reducing database queries and eliminating unnecessary script execution overhead.