How to Fix [an error occurred while processing this directive] in WordPress


If you used WordPress then you got too many errors like 500 Internal Server Error, wp-admin not Working500 errorError establishing a database connection and lots of others. Some errors are very irritating errors and “[an error occurred while processing this directive]” is one of them.

Some errors occur from file permission and some when you change your web hosting service. I get this issue when I change my hosting service and turn into the new hosting.

I’ve recently transferred a new host to my WordPress website.

When the first time I went to the website I got 500 Internal server error after creating a backup.

When I fix this error, I got 500 error but after refreshing a page, I got “[an error occurred while processing this directive]”.

So I began to search why this error occurs and how I fix it. After some researches, I didn’t get any satisfying answer to my question.

I looked around with FTP and saw that all the files and folders allowed on the site were set to 666. I removed all the files and removed my backup using a different method … the same result “Well,” I thought. “Maybe backup is bad, but I do not have another.”

I looked through a few other functional WordPress websites using FTP and noticed:

  1. All files had their permissions set at 644,
  2. With 755 permissions, all directories have been set.

I’ve found that incorrect file permissions are usually the reason that the WordPress website does not work after visiting a different server or host.

I normally use FileZilla to set permissions— but it can take hours!

So I decided that it was time to create (or find) a PHP script that would reciprocally pass every single directory on my site and automatically set permissions.

After some researching, I got the Php file script which completely fixed the “[an error occurred while processing this directive]” error.

Fix [an error occurred while processing this directive] script
  • Save
Image Source:- Google Search
You can fix this issue with the following options:

  1.  Download the Php Script, which automatically sets all directory permissions to 755, and all 644 files.
  2. You may edit the script to change the permissions to any other value if you need it.
  3. Unzip the Php script and upload the PHP file to your website’s root folder.
  4. Go to
  5. After a moment, a list of files and directories appears, which means that the script has successfully set the permissions.

As always, I recommend that you delete the script from your server once you use it – it’s not the kind of thing you want a hacker to use.

I hope you solve the [an error occurred while processing this directive] error of your website. If you have any problem feel free to ask in the comments section. I can help you as soon as possible.

I get this script from

Solve an error occurred while processing this directive
  • Save

Hey there, welcome to WPbloggerbasic. I’m Ayush Singh, founder of this blog. I am a part-time blogger and affiliate marketer. I help Bloggers to get unique blogging, SEO, WordPress, and Affiliate Marketing guides to take their blog to the next level.

Leave a Comment

Share via
Copy link
Powered by Social Snap