Magento wysiwyg image uploader not working

Magento wysiwyg image uploader not working

August 13, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento wysiwyg image uploader not working

Solving the “Directory Not Writable” Issue in Magento WYSIWYG Image Uploader

If you’re facing the “directory not writable” error while trying to upload images into a standard CMS page in your Magento installation, you’re not alone. This is a common issue that many developers encounter.

Let’s dive into the problem and find a robust solution together.

Understanding the Issue: WYSIWYG Image Uploader Troubleshooting

When you attempt to upload an image using the WYSIWYG (What You See Is What You Get) editor in Magento, it looks for a designated folder where these images can be temporarily stored. By default, this is the media/wysiwyg directory.

If this directory doesn’t have sufficient permissions, you’ll encounter the dreaded “directory not writable” error. This is because Magento requires write access to this folder in order to save the uploaded files.

A Common Mistake: Chmod 777

You mentioned that you’ve tried setting the media/wysiwyg directory’s permissions to 777 (chmod 0777). While this will indeed make the folder writable, it’s not a recommended solution for security reasons.

Setting chmod 777 essentially grants everyone full access to the folder and files. This can pose potential security risks if your server is compromised in any way.

The Correct Approach: Chmod 775

Instead of using 777, you should set the media/wysiwyg directory’s permissions to 775 (chmod 0775).

Here’s how to do it:

cd /path/to/your/magento/installation/
chmod -R 775 media/wysiwyg

The -R flag ensures that the changes are applied recursively, affecting all files and subdirectories within media/wysiwyg.

Recreating the JS Folder

You also mentioned trying to copy the js folder from your original Magento installation. While this might seem like a logical step, it’s not necessary for fixing the image upload issue.

The WYSIWYG editor functionality relies more on the server-side configuration and the media/wysiwyg directory permissions rather than any specific files in the js folder.

Verifying Your Setup

After applying the chmod 775 command, your media/wysiwyg directory should now have the correct permissions. You can verify this using:

ls -l media/wysiwyg

Look for a line that starts with -rwxr-xr-x. The second and third fields (the rx part) indicate read, write, and execute permissions for the group and others.

Back to Business: Image Uploads Should Now Work

With these steps completed, you should be able to upload images into your CMS pages without encountering the “directory not writable” error again. The WYSIWYG editor will now be able to temporarily store the uploaded files in the media/wysiwyg directory.

Remember, it’s always crucial to maintain a balance between functionality and security when working with Magento. Never compromise on security measures like permissions in pursuit of ease of use.

If you’re looking for more advanced tips and tricks to optimize your Magento setup, feel free to explore our guide 7 Essential Tips For Optimizing Your Magento Store.

Database Security Configuration Orders

Our network