Edit2: I'm renaming the question from "WP didn't add theme automatically" to "WP can't create new directory" because I found out that the problem is a little bit more complex. The same error is going on on any operation I do that involves writing data to /var/www/html/wordpress. I already tried what has been suggested here, tried also to gpasswd -a www-data sudo and nothing... I have no idea now what to do. /Edit2

I was just following this tutorial, I did exactly like he did from 02:30 to 03:30: added a folder in /wp-content/themes/mytheme, inside mytheme added a style.css and index.php. When I went to dashboard it wasn't added automatically so I tried to upload the theme.zip manually. Now I'm getting the error message "Could not create directory". I already set chmod -R 777 to wordpress folder but still having this


Output of ls -la /var/www/html/wordpress:

lrwxrwxrwx 1 fabio www-data 20 Jan 4 16:45 /var/www/html/wordpress -> /usr/share/wordpress

Output of ls -ld /usr/share/wordpress:

drwxrwxrwx 5 www-data root 4096 Jan 8 15:46 /usr/share/wordpress

In my theme folder I got only index.php and style.css, that's how they are atm:


<h1>Hello, world!</h1>


Theme Name: ThemeTutorial
Theme URI: http://github.com/FabioNevesRezende
Author: fabiotk
Author URI: http://github.com/FabioNevesRezende
Description: Descrição do tema
Version: 1.0
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: twentythirteen

Este tema foi criado por Fábio Neves Rezende

I put those github links just because I got no other link to put, I think this won't make any error, right?

1 Answer 1


Does your style.css file have something like this at the top, customized to your theme?

Theme Name: ! Startups in Boston
Theme URI: http://bostonstartupsguide.com/
Author: Jay Neely
Author URI: http://socialstrategist.com
Description: Theme for BostonStartupsGuide.com. Initially built using Whiteboard Framework (http://whiteboardframework.com), redesigned using HTML 5 Boilerplate and inspired by 960.gs.
Version: 1.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.