Error code- wordpress needs access to your webserver

Hi WordPress junkies & newbies, ever got this error message “WordPress needs access to your web server” while working on WordPress site in your localhost? This error was thrown at me when I tried to add a plugin to my HTML converted WordPress website. I use xamp on a Mac machine – a bit of context there!

Wordpress connection error
WordPress Connection Error

If you ever encountered this, then you need this snippet of php code in your wp-config.php. Just add this line at the end of the wp-config.php file:

define(‘FS_METHOD’,’direct’);

How the “access to web server” problem is solved?

When you add the above piece of php code,  it gives permission to the localhost to directly download the plugin from the internet.

Leave a Reply

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