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 WordPress Themes Best WordPress Themes

Amy Kang
Amy Kang
17,188 Points

Unable to install new theme

I'm trying to install a new theme to localhost but I'm getting the error "Could not create directory".

I tried changing permissions to the themes directory by using chown -R usr themes and chown -R 777 themes and it still doesn't work.

I also tried downloading and manually copy pasting the folder into the themes directory. But it still doesn't show up.

1 Answer

Amy Kang
Amy Kang
17,188 Points

I was able to install on Ubuntu with the following steps:

  1. sudo nano /etc/wordpress/config-localhost.php
  2. define('WP_CONTENT_DIR', '/usr/share/wordpress/wp-content');
  3. Direct download theme zip file.
  4. Extract and place folder where ever your local wordpress themes directory is installed.

I found the answer here: https://help.ubuntu.com/community/WordPress#Troubleshooting