Fixing 403 Forbidden Error on Divi Booster's JavaScript File (wp_footer.js)

This post may contain referral links which may earn a commission for this site

A problem I see Divi Booster users have from time to time is a 403 (Forbidden) error on the Divi Booster JavaScript file (wp_footer.js). This prevents the browser from loading the necessary JavaScript code to apply some of Divi Booster's features, such as the additional social icons and the custom footer. This post covers how to solve this error.

You'll most likely notice this error in your browser's JavaScript console, where you may see an error such as this:

Failed to load resource: the server responded with a status of 403 (Forbidden). wp_footer.js

You might also spot the error if you browse directly to Divi Booster's JavaScript file (at /wp-content/uploads/wtfdivi/wp_footer.js), where you'll see an error message such as:

Forbidden: You don't have permission to access /wp-content/uploads/wtfdivi/wp_footer.js on this server.

Adding an Exception to WordFence

The most common cause of the error seems to be the WordFence plugin. I'm not overly familiar with WordFence, but I believe this is due to its Web Application Firewall feature. If it hasn't seen any accesses to the Divi Booster JavaScript while the Firewall is in "Learning Mode" (e.g. because Divi Booster wasn't installed at the time), then the Firewall will subsequently prevent access to the JavaScript file once it does exist.

To address this, the Divi Booster JavaScript file (i.e. "/wp-content/uploads/wtfdivi/wp_footer.js") can be added to the "Whitelisted URLs" list in WordFence at "WordFence > Firewall > Web Application Firewall > Whitelisted URLs".

Permit Access to Divi Booster's JavaScript File

While WordFence is the most common cause of this error that I've seen, there are other ways in which access to the JavaScript file might be blocked (other plugins, custom htaccess rules, etc).

I'm not able to provide steps for every possible thing that could block the JavaScript file, but the basic steps for solving the problem are the same:

  1. Identify what is blocking the JavaScript file from being accessed. This may be something that is restricting access to either JavaScript files and/or files within the /wp-content/uploads/ folder.
  2. Add an exception to allow access to Divi Booster's JavaScript file (located at /wp-content/uploads/wtfdivi/wp_footer.js)

If you're struggling to do this, let me know and I'll try to help out.

Enable Inline JavaScript in Divi Booster

If for some reason, you are unable to unblock the access to Divi Booster's JavaScript file, there is another option.

Divi Booster contains a setting at "Divi > Divi Booster > Developer Tools > Generated JS > Use Inline JavaScript". Enable this, and Divi Booster will include the JavaScript code it produces within the webpage itself rather than in a separate file. This will bypass any restrictions your site is placing on the wp_footer.js file.

Hundreds of new features for Divi
in one easy-to-use plugin

2 Comments

  1. Had the same issue, managed to fix it and want to share my findings:

    I found this snippet in the .htaccess file in /wp-content/uploads/ where javascript was being blocked by an old plug-in that wasn't properly uninstalled:

    # Block javascript except for visualcomposer (VC) plugin
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^.*wp-content/uploads/visualcomposer-assets/.*\.js$
    RewriteRule ^(.*\.js)$ – [F,L]

    So either comment out the snippet above or add the wtfdivi folder (and subfolders if multiple languages) to the rewrite.

    403 be gone! ๐Ÿ™‚

    Reply
    • Ah, interesting! Thanks for sharing, Christian – much appreciated. Iโ€™m sure itโ€™ll help others out. Cheers ๐Ÿ™‚

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *