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

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....

Fix Divi Text Module "Regular" Font Weight Not Working

Are you encountering an issue where the font weights in Divi's Text Module don't seem to apply as expected? In particular, you might find that when you set the text module's body text font weight to "Regular", your font is actually assigned a weight of 500 instead of...

Make the Divi Gallery Module Swipeable

The Divi Gallery Module comes with a slider mode that lets you display images in a slider with clickable left/right arrows to scroll through the images. For mobile / touchscreen users, you can improve the user experience by allowing your user to swipe to navigate to...

How to Use Divi Dynamic Content in Woo Modules Product Selector

Divi's Dynamic Content is a powerful feature that lets you populate your Divi modules and theme builder templates with data pulled in various sources, such as custom fields. This allows for efficient organization and maintenance of your sites.Unfortunately, Divi's...

Random Divi Posts