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 trial

WordPress How to Make a Website with WordPress Custom Post Types and Fields in WordPress Setting Up Custom Post Types and Fields

how can I add new plugin when working locally?

working along with Setting Up Custom Post Types and Fields, but working locally and seem to be unable to install plugins as on video, getting error message

thanks!

4 Answers

It looks like a file permission issue. I've always worked on a DO droplet instead of locally, so I wasn't aware of this. However, it seems you have read up on it some. One stackoverflow user gave an explanation and solution, and below is a chunk of code from a blog post you may or may not have read. It was take from the comments. Glad you got it somewhat figured out.

Coda probably adds the needed file permissions when when dragged into the app.

if(is_admin()) {
add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));
define( ‘FS_CHMOD_DIR’, 0751 );
}

Most times you should be able upload plugins just fine. Simply use the search field within PluginsAdd New. Otherwise, you'd have to download them directly at some point when connected to the net, and then you'll want to click Upload Plugin.

Adding Plugins to Wordpress

just figured it out manually by just dragging folder into Coda 2, guess this is good enough for now

thanks!

Thanks for your help, Dustin. The problem is that I don't have a web server that I want to use for this yet. So without the FTP info it won't let me get past the Connection info screen. Other on the net seem to think adding "define('FS_METHOD', 'direct');" to the wp-config file helps, and seems to, but them doesn't work in the end. When I download manually it doesn't come as a package so not sure how to upload the whole package instead of just the .php file. Sorry, I'm pretty new to this.

thanks AGAIN!