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.

Fix Your Divi Booster Issues Seamlessly!

Troubleshoot and enhance your Divi Booster experience with our comprehensive guide to resolving common issues, like the 403 Forbidden Error on wp_footer.js. Learn how to manage WordFence settings and leverage Divi Booster features for uninterrupted functionality.

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.

Latest From Divi Booster

Enable Automatic Looping for YouTube Videos in the Divi Video Module

Enabling automatic looping for YouTube videos in your Divi video module ensures that content plays seamlessly and continuously without interruption. This feature can enhance user engagement, highlight key information, or create dynamic visual effects on your website....

Hide Video Controls in Divi Video Module

Disabling YouTube video controls in the Divi Video Module helps create a seamless, distraction-free viewing experience for your site visitors. This approach is useful when you want full control over how your video content appears and is interacted with on the page, or...

Mute YouTube Videos by Default in the Divi Video Module

In the Divi Video Module, starting your YouTube videos muted by default can create a more user-friendly browsing experience on your webpage. It is particularly beneficial for reducing distractions, enhancing visitor engagement, and providing a seamless content preview...

Autoplay Videos in Divi Video Module

Enabling videos in your Divi video module to start playing automatically can enhance both the site's design and user engagement. To ensure full compatibility with browser requirements, such as Chrome's autoplay policy, it's often necessary to start your videos muted...

How to Add the Post Status in Divi's Dynamic Content

Divi's Dynamic Content feature is great for enhancing your post/page templates with post-specific information. While Divi includes an option to show information such as the Post Created Date using Dynamic Content, there is no equivalent option for the Post Status....

Random Divi Posts