Skip to content
  • There are no suggestions because the search field is empty.

How to Integrate Prerender with WordPress

Three Integration Methods for Connecting Prerender.io with Your WordPress Site Based on Your Tech Stack

These methods can be categorized as CDN integration or backend integration. Choose your method based on the level of control you require and your comfort with editing server configuration files. Backend integration offers more flexibility, while CDN integration is often quicker to apply.

Integration Options for WordPress with Prerender.io:

  1. Cloudflare CDN Integration:
    It's fast to set up but usually, you have less flexibility than Backend integration. This is your best option if your hosting provider doesn't allow direct server access.
  2. Apache Backend Integration:
    The integration is achieved by enabling modules, modifying the httpd.conf and .htaccess files. Apache's mod_rewrite module must be enabled for the integration to function properly. You will also need editing permissions in order to use this integration method.
  3. Nginx Backend Integration:
    To integrate with Nginx, you need to modify the configuration files. You will need editing permissions in order to use this integration method.

You will see the detailed steps for each method listed here:

1. Cloudflare CDN Integration

This is the fastest setup method, but it typically offers less flexibility than backend integration. Cloudflare is especially helpful if your hosting provider does not allow direct access to server configuration files. This integration will use the ESM JavaScript syntax in Cloudflare Workers.


You can find the detailed Cloudflare guide here: Cloudflare CDN Integration


2. Apache Backend Integration

You can find the Apache config here: Apache Backend Integration
It's also accessible via GitHub.
 

This integration method involves enabling modules and editing both the httpd.conf and .htaccess files. You will need editing rights in order to use this method. 

Site owners using Apache can usually access and edit their .htaccess files. Depending on your hosting provider’s configuration, you may be able to enable the necessary modules—given they are installed on the server. However, one critical requirement is the 'SSLProxyEngine on' directive in the VirtualHost configuration, which is often inaccessible unless you have root privileges. 

Steps to apply Apache integration via your control panel:

  • You can edit the .htaccess file via your control panel’s file manager or using FTP/SFTP.
  • You may need to manually enable Apache modules depending on your hosting environment. 

Here’s how to enable Apache modules across different control panels:

  • In cPanel:

    • Search for "Select PHP Version" or "MultiPHP INI Editor"
    • Find a section related to Apache modules or handlers
    • Check the required module boxes
    • Save the changes
  • In Plesk:

    • Go to "Tools & Settings" > "Apache Web Server"
    • Locate the "Modules" section
    • Enable the required modules by checking the boxes
    • Click "Apply" to save changes
  • In DirectAdmin:

    • Go to "Server Manager" or "Admin Tools"
    • Navigate to "Apache Configuration" or "Apache Modules"
    • Select the necessary modules
    • Save changes and restart Apache if required

⚠️ Note: If your .htaccess file is not accessible, the necessary Apache modules are missing or cannot be enabled, or the 'SSLProxyEngine on' directive is not added to your VirtualHost config, reach out to your hosting provider’s support for assistance.

 

3. Nginx PHP Application (Backend Integration)

You will need to use the PHP application Nginx integration for your WordPress site.

You can find the example configurations here: View source on GitHub. 
You can find a text and video guide here: Nginx PHP application.


⚠️ Note: It is worth asking your hosting provider if they can apply the required changes for you, in case your access is limited.

✅ Verifying Integration: Once you've completed the setup, refer to Prerender's verification guide to ensure the integration was successful.