terminal 開啟
路徑設定-
sudo gedit .bashrc
路徑設定-
> export PATH=/xxx/xxx/:$PATH
source .bashrc
application: 你的專案
version: wp
runtime: php
api_version: 1
handlers:
- url: /(.*\.(htm$|html$|css$|js$))
static_files: wordpress/\1
upload: wordpress/(.*\.(htm$|html$|css$|js$))
application_readable: true
- url: /wp-content/(.*\.(ico$|jpg$|png$|gif$))
static_files: wordpress/wp-content/\1
upload: wordpress/wp-content/(.*\.(ico$|jpg$|png$|gif$))
application_readable: true
- url: /(.*\.(ico$|jpg$|png$|gif$))
static_files: wordpress/\1
upload: wordpress/(.*\.(ico$|jpg$|png$|gif$))
- url: /wp-admin/(.+)
script: wordpress/wp-admin/\1
secure: always
- url: /wp-admin/
script: wordpress/wp-admin/index.php
secure: always
- url: /wp-login.php
script: wordpress/wp-login.php
secure: always
- url: /wp-cron.php
script: wordpress/wp-cron.php
login: admin
- url: /xmlrpc.php
script: wordpress/xmlrpc.php
- url: /(.+)?/?
script: wordpress/index.php
cron:
- description: wordpress cron tasks
url: /wp-cron.php
schedule: every 2 hours
google_app_engine.enable_functions = "php_sapi_name, gc_enabled"
// ** MySQL 設定 - 您可以從主機服務提供商獲取相關資訊。 ** //
/** WordPress 的資料庫名稱,請更改 "database_name_here" */
define('DB_NAME', 'database_name_here');
/** MySQL 資料庫使用者名稱,請更改 "username_here" */
define('DB_USER', 'username_here');
/** MySQL 資料庫密碼,請更改 "password_here" */
define('DB_PASSWORD', 'password_here');
/** MySQL 主機位址 */
if(isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'],'Google App Engine') !== false) {
define('DB_HOST', ':/cloudsql/專案:資料庫(同database_name_here)');
}else{
define('DB_HOST', 'localhost'); //本地端開發用
}