WordPress Tips: How to avoid requests for FTP details when working with a local copy of WordPress

I’ve worked with WordPress for over a decade now. Ive seen it evolve from a handy little blog app into a full blown CMS. Sometimes though it can simply be “see a mess”.

We use WordPress where I work for our company website. Its useful and makes building tools for site marketers far easier than trying to create a bespoke solution.

Often when setting up a local copy for development I want to add the following code to the wp-config.php file
define('FS_METHOD','direct');

This will prevent your copy of wordpress from asking for FTP details when you want to add a plugin or theme to your site via the Admin UI.