WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Dreaded 500 Permissions Error with New Media (3 posts)

  1. primasilva
    Member
    Posted 8 months ago #

    While I'm using pretty permalinks, whenever I upload mew media, I get that awful 500 error until I manually go in and set permissions for each media item, despite everything I've tried. Super annoying!

    I changed folder permissions for C://Windows/Temp and also redirected to a different temp upload folder in php.ini and changed permissions for that. And then changed them for wp-content/uploads.

    IUSR and IIS_IUSRS both have read/write capabilities in every folder. But whenever I upload media, the permissions of that file are still read-only for IIS_IUSRS. The rule isn't inheriting properly.

    Any advice?

    ...and no, I can't switch to Linux. Trust me, I'd love to, but it's against my company's policy.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 months ago #

    Instead of changing the temp upload folder in the php.ini, try having WordPress use a specific folder for temp uploads.

    In your wp-config.php file, add this to the top:

    define('WP_TEMP_DIR','some-tmp-upload-folder-path');

    Replace that path with a folder you want to be the temp upload folder, and be sure that folder has the correct permissions.

    The thing about IIS and Windows hosting is that you can never be totally sure where that darned temp folder is. The WP_TEMP_DIR define forces WordPress to use that path, period. Overrides everything.

    Obviously, the php.ini needs to have the same upload_tmp_dir variable too.

  3. primasilva
    Member
    Posted 7 months ago #

    That worked! Thanks for your help :)

Reply

You must log in to post.

About this Topic