4

我已经安装了在 Google Appengine 1.8.1 SDK 上运行的 WordPress 3.5.1。注意,我有 ubuntu 12.04。WordPress 工作正常;我创建帖子,上传图片等。我的问题如下:

我可以激活和停用插件,但管理面板没有给我添加新插件的选项。

我发现为了安装插件,我必须去

http://localhost:8080/wp-admin/plugin-install.php

. 但是当我到达那里时,我收到以下消息:

You do not have sufficient permissions to access this page.

我发现这个问题与管理员角色有关。

探索了我的数据库...我去了wp_usermeta表 -> 查看了meta_key行为wp_capabilities. meta_valuea:1:{s:13:"administrator";b:1;}。_ wp_user_level值也是10. 请注意,这user_id1管理员的 user_id。

我也走到wp_options桌子前-> 看了option_name行的列wp_user_rolesoption_value是_

a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:62:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;s:10:"list_users";b:1;s:12:"remove_users";b:1;s:9:"add_users";b:1;s:13:"promote_users";b:1;s:18:"edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}

为了查看 WordPress 3.5.1 是否有任何问题。我安装了 Apache 服务器并在那里测试了 WordPress。一切正常,我可以从管理面板安装插件。我认为这个问题与 Appengine SDK 有关。现在我通过将插件上传到wp-content/plugins文件夹来手动安装插件......

有没有人能够通过在 Appengine SDK 上运行的 WordPress 3.5.1 的管理面板安装插件?

4

2 回答 2

1

我认为这被 Google App Engine 插件阻止了。我认为做到这一点并不容易。您最好的选择是将插件下载到您的本地环境,然后运行 ​​appcfg.py update - 但我可能是错的,并且会喜欢更简单的方法......

于 2013-09-15T06:44:14.050 回答
0

Google App Engine 文件系统不可写。为了安装 WordPress 插件,您必须将它们添加到plugins本地文件夹中,然后使用appcfg.py或部署您的应用程序gcloud。部署后,您可以转到插件页面并激活它们。

注意:您需要将 WordPress 的本地副本放在手边,因为您需要它来安装自定义主题和插件。由于安全沙箱,您的实时 WordPress 站点无法写入本地文件——它们是静态的。这意味着 WordPress 仪表板中主题和插件的自动安装仅适用于您在自己的机器上运行的本地 WordPress。因此,请记住在本地进行所有安装,然后重新部署您的 WordPress 应用程序。[1]

[1] https://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/

于 2015-11-19T15:20:37.383 回答