To deploy a specific folder on Google App Engine (GAE) for WordPress, you can follow these steps:
- Create a new folder inside your WordPress project directory and move the files you want to deploy into that folder. For example, if you want to deploy the
wp-content/uploads
folder, you could create a new folder calleduploads
and move the contents of thewp-content/uploads
folder into it. - Create an
app.yaml
file in the root directory of your WordPress project. This file is used to configure the GAE deployment. - Inside the
app.yaml
file, add the following configuration:
yamlCopy coderuntime: php55
api_version: 1
handlers:
- url: /uploads
static_dir: uploads
This configuration tells GAE to serve the files in the uploads
folder as static content.
- Open the Cloud SDK command prompt and navigate to the root directory of your WordPress project.
- Run the following command to deploy your project to GAE:
Copy codegcloud app deploy
This command will upload your entire WordPress project to GAE, but only the files in the uploads
folder will be served as static content.
- Once the deployment is complete, you should be able to access the files in the
uploads
folder at the URLhttps://your-app-id.appspot.com/uploads/
.
By following these steps, you can deploy a specific folder on GAE for WordPress while keeping the rest of your project files private.
(Visited 5 times, 1 visits today)
Was this article helpful?
YesNo
Last modified: March 3, 2023