Actually this is a somewhat older article, but still it is much visited and still necessary. That’s why an updated version!
I regularly get the question from readers why it is not possible to add an image or photo to their WordPress article or page. The answer is simple: this is almost always the configuration of the web server, so your hosting provider. And then? Give up and try Joomla or something else again?
Well no, let me start by stating that if you run into a problem, it will never be a solution to choose a different system. Each CMS has its own advantages and disadvantages and with a switch you will sooner or later also run into a challenge. Sometimes that means a lot of searching, hiring an expert or more rigorous measures. Because in this case the problem is often caused by settings at your provider, the chances are that you run into similar problems with other systems.
If you can not upload an image or photo in WordPress, you will usually receive such an error message:
Unable to create directory / wp content / uploads / 2016/10
The uploaded file can not be moved to wp-content / uploads / 2016/10
As I wrote, the cause lies with your provider. You see this phenomenon regularly with inexpensive shared (shared host) web environments. Check with your provider if ‘Safe mode’ is on and ask if that can be switched off. Something that they often do not want to perform. If that does not work then you have the following alternatives:
- Make sure you have the folder wp-content / uploads in any case and make 2017 and 2018 also possible already. Give these folders with for example Filezilla file permissions 777. But beware: this is a remedy, because it is at the expense of the security of your website! Actually, this is bad advice for that reason. It often works, but can also ensure that third parties get access to your website.
- If WordPress still does not manage to create a folder for itself (10 for October, 11 for November, etc) for each month, you can consider switching it off. In your WordPress, go back to ‘Settings’, ‘Media’ and uncheck ‘Save files in folders based on month and year’. With this you place all your media files in one folder and WordPress does not have to create folders anymore. This almost always helps in combination with point 1.
- Sometimes it is necessary to change the ‘owner’ of the uploads folder from the ftp user to the apache.apache user. Have this done by your provider, because you yourself have those rights only rarely. Moreover, it is a step that goes too far for beginners. If you have SSH access you can do it yourself with the command CHOWN, but that is usually not the case in a shared hosting environment.
- In the WordPress configuration file (wp-config.php), add the following line: define (‘WP_MEMORY_LIMIT’, ’64M’); This determines the amount of memory allocated to WordPress, which can solve the problem. With most providers, however, this setting is ignored. Advanced users can make a similar addition in the top of the .htaccess file: php_value memory_limit 64M.
- And actually this is the best tip: Choose a different hosting provider and ask in advance if they provide technical support on WordPress. This is because most providers do not. For example, choose Byte if you want to make sure that your WordPress website will work well. I also often work with Managedwphosting, a provider specialized in WordPress. Interested in a discount offer? Please contact us. Please note: in the first instance, I am not concerned with selling you a different subscription than you already have. But if you can not figure it out yourself with your own provider, switching to a provider that offers slightly higher quality is the most advantageous solution on balance.
- What you also need to look at is the available disk space with your hosting provider. With a new WordPress installation that will not be the problem, but if it suddenly appears at the head of a WordPress website that you have been using for a long time, this could be one of the possible causes.
- Does nothing help? Try to save the permalink settings again. Go to Settings – Permalinks. You do not have to change the existing settings, but save them again. I have experienced before that the problem then disappeared spontaneously
Hope these tips will help you next time you encounter a problem with images uploading to WordPress.