Hello, when I push a site up to WP Engine the permission on the media files are set incorrectly. Images and icons in particular aren’t resolving. When I use the Reset File Permissions button under the Utilities section in their portal, the files can then be seen from then on.
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
Upload a new file to the media library and push the site to WP Engine.
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
On your device are you running Local as admin? Can you review the files and folders of your site and ensure the permissions are set correctly if you haven’t already?
Yes, I’m running the site as a Windows admin. What Windows permissions should they have on the windows side?
One other thing I don’t think I mentioned is that once the file is uploaded and the permission is set remotely, it stays set to the correct permission. Not sure if that helps though.
One other thing I don’t think I mentioned is that once the file is uploaded and the permission is set remotely, it stays set to the correct permission. Not sure if that helps though.
Are you referring to your original post where you said when you reset permissions in WPE then the images appeared?
So then if you pull the site back down to Local and push again do you have to reset again or does it stick?
Is this something that’s come up for multiple sites? Or just one site multiple times?
@Nick-B Yes, if I add new images to the Locals install and push it to WP Engine, the permissions of the media files aren’t set correctly and I don’t see images. When I use the WP Engine Reset Permissions utility, I can then see the images as expected. If I pull the site back down, make changes, and push it back up again, the permissions stay the correct permissions and I don’t have to reset the permissions again.
This behavior happens on all of the sites I’ve worked on in the past few months. I’m using the same computer to push and the same WP Engine hosting environment. Earlier this year, permissions were set correctly on push but I can’t give you an exact date when this started happening.
We can’t replicate this issue at all, but when you say that permissions are the issue, is this just because hitting that Regenerate Perms button resolves it or have you checked the file permissions to see what differences they show between your hosted site and Local site? I’m just wondering if the Regenerate Button is performing additional tasks that could be refreshing things. For example, are you using any specific theme/plugin builds like Elementor, Divi, Astra, BB, etc? These could have caching or CSS that needs flushes, regenerated, etc. There could be other mixed content errors, permalinks, etc. When you go to the WPE side and see the images missing are there any error messages showing up in the dev console?
@Nick-B I added a new image to one of my projects and pushed it back up to WP Engine. Here’s what I see in my FTP client looking at the uploaded files:
I am using Divi however clearing it’s cache doesn’t seem to address this issue. It’s a simple img tag so I don’t think that would have an effect.
In the console I see a 403 error for the main image which tracks since the permissions aren’t set correctly. I don’t see any mixed content messages or other messages that would apply to this issue either.
Please let me know if that helps or if I can provide any more details.
Hi @colllincondray! You jogged my memory here and I realized we had an open bug that might be what you’re running into. On your device are you using a drive other than C?
@Nick-B Yes, I do have multiple drives. Windows and Locals are running on C drive. I have another drive for my data folders (Documents, Downloads, Music, etc.) but all of the Locals components should be running of the C drive.
Hey @colllincondray - I tried testing this on my Windows 11 VM but I couldn’t replicate. The image had the correct perms in Local and after push it loaded fine on WPE.
As a test could you spin up a new, blank site in Local, add an image there and push and see if it happens? That might help indicate whether it’s a site level conflict or a device conflict happening.