Question

Wordpress error: Cannot write style-custom.css file

I upgraded to WordPress 3.8 and looking around I opened

“Apearance --> Customize”

and then hit

“Close”

without making any changes.

Now my website is down and I can’t access wp-admin. When I try either I get;

{“success”:“-1”,“alert”:“Cannot write style-custom.css file, you may try setting the style-custom.css file permission to 755 or 777 to solved this. ( If file does not exists, you have to create it yourself )”}

I found that I have four themes listed in;

/var/www/wp-content/themes

  1. bluediamond-v 1_05 (This is the only one that has the “style-custom.css” file
  2. twentyfourteen
  3. twentythirteen
  4. twentytwelve

I changed the existing “style-custom.css” file permissions to 755. I still can’t access wp-admin or the website - I continue to get the same alert.

Any help is very much appreciated

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello all,

I think this has been resolved as a whole in newer WordPress versions. Having said that, this issue can be resolved(temporarily) by changing the WordPress theme to the default one.

To do that, you can use the wp-cli tool. Wp-cli is a tool that helps you manage your WordPress installation. It allows you to create users, change their passwords, update themes, plugins, and many more.

Here is their official website from where you can install and configure wp-cli to run on your Droplet - https://wp-cli.org/

This comment has been deleted

I have the same problem as @manorris111. I have tried with permissions and creating new style-custom.css but nothing works., I cant access my web page or wordpress. Only by renaming or deleting my theme folder with winscp could help getting into wordpess but applying my theme again shows the same error. Can you help me please?

Try rebooting your server via SSH. If that doesn’t resolve the issue: Are you able to access WP if you switch to one of the other themes?