Upload folder is not writable. Export and file upload features will not be functional.

March 4th, 2019 admin Location: Raleigh, NC, Topic: Web Design | Digital Media

WordPress is a fantastic CMS platform. It is preferred by many clients and therefore as developers we end up using it for all sorts of projects. Sometimes, things go sour though. If you have moved a WordPress site from development to staging to production, you have run into funny problems such as the little red message called: “Upload folder is not writable. Export and file upload features will not be functional.”

Of course, this message is not only about the message, but also about the fact that the installation won’t allow you to upload any files. Well in this post with this simple solution you won’t have that problem anymore.

How not to fix it.

So first I would like to start by saying how not to fix this problem. When I had the problem, my first impression was that it had to do more with ownership than it did with permissions – which is true, however, you shouldn’t fix it by attempting to modify permissions. Let me explain.

The problem happens because your server’s user and group can write to your WordPress Upload Folder in order to either 1. Create the folder for the month’s uploads or 2. Upload a particular file to that folder. Of course you would think that the user should be able to do so since the owner of the site should also be the same owner of the FTP account that you used to upload the files, right? It is correct. However in some cases, in some hosts it is different. In other words, some hosts use a specific user account to act as the server and another one that you use in FTP or SSH, etc. In other words, you are not acting as the same user even if you think you are.

You could try to make both be the same, however that would simply be too painful.

How to fix it.

In many occasions this can be fixed by doing the following:

1. Make sure that the user and group that owns all your WordPress files is consisten across your site. Be careful here because you may accidentally change more than what you should and therefore make your server return an error. If you do, don’t freak out! You can fix it with no problem.
Before you begin, note the user and group of your httpdocs/ or public_html/ or www/ (BE SURE TO NOTE THIS we are going to call this realuser:realgroup).
So let’s say that you installed WordPress in yourdomain/httpdocs/ so simply run the following TWO commands:

chown -R yourftpuser:yourftpgroup httpdocs/
chown realuser:realgroup httpdocs/

*Please note that in the second command I didn’t use -R (for recursive).

Ok great. Now we have ensured that your installation is under the right ownership. Let’s go ahead and fix the permission problem.

cd /wp-content
chmod -R 777 uploads/
chmod -R 755 uploads/

* You may be thinking now, WHAT? Why would you first change to 777 and then immediately change to 755. The reason we need to reset the permissions from the perspective of the SSH user (root) and we do that by giving 777 permissions, then when we change them to 755 then it defines all permissions as read, write and execute for the user, read and execute for group and world – which is what we want. NOTE: I have seen some posts that recommend setting permissions to 777 and forgetting about it – I recommend against that. You don’t want every user in your server, to have write access to your folder.

Tha’t it friends, now enjoy uploading files to your WordPress installation. Let me remind you that of course this works for both simple WordPress and Multisite – in fact I tested it with Multisite and worked accordingly.

If you liked this post, please take a second to comment below, it would take only a couple of seconds!

Thanks again,

Alex

About the Author

Alex Centeno MBA., is an international creative director and digital media strategist. Currently residing minutes away from the Research Triangle Park (RTP) - North Carolina, and with over 10 years of interactive marketing training and experience, Alex leads Merkados' international clients to maximizing their online business strategies. One of Alex's biggest strengths is his world-class capacity to effectively combine interactive marketing, digital media design and web development.

You may find further information about Alex Centeno MBA. at: and Twitter.

Sobre el Autor

Alex Centeno MBA., Es un director creativo y estratega de medios digitales reconocido internacionalmente. En la actualidad reside a tan solo minutos del Research Triangle Park (RTP) - Carolina del Norte, y con más de 10 años de entrenamiento y experiencia en marketing interactivo, Alex lidera a los clientes internacionales de Merkados™ para maximizar sus estrategias de negocios en línea. Una de las mayores fortalezas de Alex es su capacidad global de combinar de manera efectiva, mercadeo interactivo, diseño de medios digitales y desarrollo web.

Para más información sobre Alex Centeno MBA. puede visitar: y Twitter.