I wrote a real quick javascript file in NotePad++, and I am scratching my head about this 403 error I’m getting as I try to load it. Note that everything else associated with my WordPress install and the various plugins I have acquired are working perfectly. I also have yet to use any security plugins since I’m currently running my website in WAMP localhost. I changed the file to 755 using Cygwin’s chmod, but that didn’t help. The file is currently in my theme’s directory, and I am trying to embed it into the bottom of a single page. The methodology I am using is described here (https://codex.wordpress.org/Using_Javascript), and, specifically, this is all I have done:

<script type="text/javascript" src=/mysite/wp content/themes/RainForest/slider.js"></script>
<script type="text/javascript">
<!--
test();
//--></script>

I also tried replacing the “slider.js” with another javascript file that is 200 when ran inside a PHP file, and it too got a 403 error when I tried to run it inside the content of a page. Has anyone else ran into this problem? What, if anything, could I be missing here?

Read more here: WordPress JavaScript 403 Error


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: