我已经在我的app-engine上部署了wordpress,我在我的本地版本上添加了一个主题 - 森林主题并激活了它。 此主题在Admin视图上有自己的配置部分,它仅适用于本地版本的站点。部署时,它不会加载。
http://i.stack.imgur.com/CJEwI.jpg(这是问题)
你知道什么是错的吗?也许appl.yaml文件(我使用过标准文件)。
谢谢你, Leandro的
application: my-app-id
version: wpfromstarterproject
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|svg|pdf))$
static_files: wordpress/wp-content/\1
upload: wordpress/wp-content/.*\.(ico|jpg|png|gif|svg|pdf|)$
application_readable: true
- url: /(.*\.(ico|jpg|png|gif|svg))$
static_files: wordpress/\1
upload: wordpress/.*\.(ico|jpg|png|gif|svg)$
application_readable: true
- 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: /wp-(.+).php
script: wordpress/wp-\1.php
- url: /(.+)?/?
script: wordpress/index.php
skip_files:
- ^(.*/)?\.zip$
- ^(.*/)?\.bat$
- ^(.*/)?\.sh$
- ^(.*/)?\.md$`
答案 0 :(得分:0)
我一直在使用这个初学者项目:https://github.com/GoogleCloudPlatform/appengine-php-wordpress-starter-project
该项目包含此app.yaml:
application: your-project-id
version: wpfromstarterproject
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)$
application_readable: true
- 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: /wp-(.+).php
script: wordpress/wp-\1.php
- url: /(.+)?/?
script: wordpress/index.php
skip_files:
- ^(.*/)?\.zip$
- ^(.*/)?\.bat$
- ^(.*/)?\.sh$
- ^(.*/)?\.md$
它对我来说很好!如果您在测试中遇到一些问题,我可以为您提供更多详细信息。
我希望这有帮助,
Zouhaier
答案 1 :(得分:0)
这必须是序列化数据或瞬态的问题。
尝试使用以下代码迁移数据库:https://wordpress.org/plugins/wp-migrate-db/
并删除数据库中的所有瞬态... 为此,您必须执行下一行:
DELETE FROM
wp_options
WHEREoption_name
LIKE('%_ transient _%');
您也尝试阅读错误的日志文件。
答案 2 :(得分:0)
好的,再次上班。
解决方案是使用file_get_contents
更改cURL的使用 $url = ReduxFramework::$_url . 'inc/fields/typography/googlefonts.html';
// New Code
$data = [''];
$data = http_build_query($data);
$context = ['http' => ['method' => 'get']];
$context = stream_context_create($context);
$googleHTML = file_get_contents($url, false, $context);
// Old Code
/*$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$googleHTML = curl_exec($ch);
curl_close($ch);*/
// Just a check used in the template
if (empty($googleHTML)) {
$googleHTML = false;
}
所以"旧代码"是不受appengine支持的那个,你必须用" New Code"部分。
希望它有所帮助。 谢谢大家的支持。
Leandro