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

Written by Dan Mossop

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.

Maximize Engagement with AI-Powered CTAs

Enhance your WordPress posts and ensure that every reader finds the perfect call-to-action with WP Magic CTAs. This AI-powered plugin generates tailored CTAs for each of your posts, helping to boost engagement and conversion rates. Ideal for promoting content or offers, and effortless to use.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

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

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

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

We may earn a commission when you visit links on our website.