I’m migrating a WordPress site to Google Cloud using Click To Deploy. All as gone well so far except a folder permissions problem when migrated the current sites wp-content folder.
Steps I took to make this work…
- I set up a new WordPress install by using Click To Deploy and tested that I could upload new images to the server.
- Uploaded and installed my backup database and current site files. In other words, I overwrote the files on the new WordPress install.
- Tested the site by changing my ‘host’ file to match the new Google Cloud IP.
All looks great on the front end but in the admin area I can no longer upload images for new posts or pages.
I know this is probably a permission issue but I can’t figure it out. Please let me know if you have suggestions.
If you have a good sense that it’s directory permission issues, a simple way to diagnose might be to create a new Google Cloud Project, create another click to deploy instance, ssh to /var/www and run
ls -al
and compare permissions between what you have today and what the default scheme is. You may have to descend down a few levels into the directory that holds user-uploaded files.My guess is that when you copied your site onto your instance, you modified directories where your linux user account is the owner, and when you try to upload files, the
www-data
user (Apache) cannot write to those directories any more.You shouldn’t have any issues running chown when logged in via ssh. Please post the output or error messages of that command.