To deploy a specific folder on Google App Engine (GAE) for WordPress, you can follow these steps:

  1. 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 called uploads and move the contents of the wp-content/uploads folder into it.
  2. Create an app.yaml file in the root directory of your WordPress project. This file is used to configure the GAE deployment.
  3. 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.

  1. Open the Cloud SDK command prompt and navigate to the root directory of your WordPress project.
  2. 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.

  1. Once the deployment is complete, you should be able to access the files in the uploads folder at the URL https://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 18 times, 1 visits today)
Was this article helpful?
YesNo
Close Search Window