我已经安装了在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_value
为a:1:{s:13:"administrator";b:1;}
。 wp_user_level
值也是10
。请注意,user_id
是1
,它是管理员的user_id。
我也去了wp_options
表 - >查看了option_name
行wp_user_roles
。 option_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的管理面板安装插件?
答案 0 :(得分:1)
我认为Google App Engine插件阻止了这一点。我不认为这样做很容易。你最好的选择是下载插件到你的本地环境,然后运行appcfg.py更新 - 但我可能错了,并且会喜欢更简单的方式......
答案 1 :(得分: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/