Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDávid Molnár
27,081 PointsWordpress Plugin / theme installation issue | File permission
Hey Everyone!
I've installed Wordpress locally on Linux Mint using XAMPP . The installation was successful, unfortunately it asked for FTP credentials when I tried to install a theme or a plugin. I fixed the issue by writing: "define('FS_METHOD', 'direct');" in the config file. When I tried to install a plugin again it let me without asking for FTP credentials, but threw an error: "unable to create directory". I changed the file permisson in the wp-content folder from 755 to 777 so it's working now but as i know it's a huge security issue and as a user 755 should work perfectly.. Any idea what could be the source of this problem? I'm out of ideas...
Thank you in advance!
1 Answer
Jacob Mishkin
23,118 PointsI don't work with windows, but if you wanted you can add a conditional statement for if is_admin():
if ( is_admin() ) {
define('FS_METHOD', 'direct');
}
Outside of this not sure what else you can do.
Dávid Molnár
27,081 PointsDávid Molnár
27,081 PointsI also wanted to change from windows to Linux Mint, it happend in Linux distribution and I fixed the problem. But as I wrote:
define('FS_METHOD', 'direct');
wasn't enough. I also needed to change the permission to 777 from 755 that never should happen normally. I'd just like to know the cause of this.Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 PointsThe only thing I can think of is the permissions on your own computer. Outside of that I'm not sure, first time, I've seen this issue.