简体   繁体   English

新服务器-无法创建wordpress页面-空白/wp-admin/post.php

[英]New server - Unable to create wordpress pages - Blank /wp-admin/post.php

Recently I moved a website to a new server. 最近,我将网站移至新服务器。 The website was working perfectly on the shared server, but I've encountered a host of permission issues and other problems since relocating to EC2. 该网站在共享服务器上运行良好,但是自从迁移到EC2以来,我遇到了许多权限问题和其他问题。 I have changed the ownership of the /var/www/html folder to apache to allow altering altering of settings on the back end of WordPress. 我已将/ var / www / html文件夹的所有权更改为apache,以允许更改WordPress后端的设置更改。 Strangely enough, I am able to create new posts, but when I attempt to update an existing page or create a new one, I receive a blank page. 奇怪的是,我能够创建新帖子,但是当我尝试更新现有页面或创建新页面时,会收到一个空白页面。 [http://example.com/wp-admin/post/php] Originally I thought it was yet another permission based issue, but after researching that doesn't appear to be the case. [http://example.com/wp-admin/post/php]最初,我认为这是另一个基于权限的问题,但经过研究后似乎并非如此。

Steps I've taken thus far: 1) Changed ownership of the directory to apache 2) Disabled all my plugins 3) Added : php_flag output_buffering on to .htaccess (Although I wasn't sure if it mattered where in the .htaccess file I should put that command) 到目前为止,我已经采取的步骤:1)将目录的所有权更改为apache 2)禁用我的所有插件3)添加:将php_flag output_buffering设置到.htaccess(尽管我不确定.htaccess文件中的位置是否重要应该把那个命令)

From the research I've done it appears that white space after the ?> could be the cause. 从我所做的研究来看,?>后的空白可能是原因。 Anyone know how I could tell which file would have this white space? 有谁知道我怎么知道哪个文件会有这个空白? Several of my files actually do not even have the PHP close tag. 我的一些文件实际上甚至没有PHP close标记。 One additional note, my previous server was version 5.2.17 to 5.3.20. 还有一点需要注意,我以前的服务器是5.2.17至5.3.20版。 Any other ideas? 还有其他想法吗?

After checking the error logs I discovered that I was missing the mbstring PHP library, which has a function that was called by one of my theme files. 检查错误日志后,我发现我缺少mbstring PHP库,该库具有由我的主题文件之一调用的功能。 Once added I was able to create and alter pages on the backend of WordPress without issue. 添加后,我就可以在WordPress的后端上创建和更改页面,而不会出现问题。

To all the folks who get this kind of error of page not displaying must check option. 对于所有出现这种页面不显示错误的人来说,都必须选中选项。 turn on error reporting if you have commented the lines in your wp-config.php 如果您已经注释了wp-config.php的行,请打开错误报告

@ini_set('display_errors','Off');

and than check for error. 然后检查错误。 if it has the error like this 如果有这样的错误

PHP Warning: Cannot modify header information - headers already sent by (output started at /[server info]/wp-config.php:77)

than check your wp-config.php for extra space at top and bottom of the page.remove extra line spaces even. 而不是检查wp-config.php在页面顶部和底部是否有多余空间。甚至还要删除多余的行距。 and than re-upload the wp-config.php . 然后重新上传wp-config.php Most of time this will solve your problem. 大多数时候,这将解决您的问题。

Happy Coding!!!! 编码愉快!!!

I had a similar problem and by removing extra spaces before the "< ?php" fixed the issue. 我遇到了类似的问题,并在“ <?php”解决问题之前删除了多余的空格。 Although apparently it was a different theme functions file that was causing the issue. 尽管显然是导致此问题的另一个主题函数文件。 Make sure you look at the php file referenced in the php warning. 确保您查看php警告中引用的php文件。 In this example, it's 'wp-config', but it could be really anything. 在此示例中,它是“ wp-config”,但实际上可以是任何东西。

PHP Warning: Cannot modify header information - headers already sent by (output started at /[server info]/ wp-config.php :77) PHP警告:无法修改标头信息-标头已发送(输出始于/ [服务器信息] / wp-config.php :77)

Good luck! 祝好运!

Basically this issue happens because you have edited the file directly on cpanel editor or other simple text editor. 基本上发生此问题是因为您直接在cpanel编辑器或其他简单的文本编辑器上编辑了文件。 Just create a new .php file and paste your post.php code in that file. 只需创建一个新的.php文件并将您的post.php代码粘贴到该文件中即可。 Now save this file and replace this new one with old post.php. 现在保存此文件,并用旧的post.php替换这个新文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将自定义Wordpress编辑器提交到wp-admin / post.php - Submit custom Wordpress Editor to wp-admin/post.php 如何创建在wp-admin / post.php页面中工作的wordpress插件 - How to create a wordpress plugin who is working in wp-admin/post.php page 为什么我不能在 Wordpress 中创建新帖子? 警告:从第 716 行的 /public_html/wp-admin/includes/post.php 中的空值创建默认值 object - Why can't I create new posts in Wordpress? Warning: Creating default object from empty value in /public_html/wp-admin/includes/post.php on line 716 更新自定义帖子类型的帖子时显示错误禁止您无权访问此服务器上的 /wp-admin/post.php - When updating a post of a custom post type its shows an error Forbidden You don't have permission to access /wp-admin/post.php on this server WordPress-WP-Admin空白页 - WordPress - wp-admin blank page Wordpress:JavaScript无法在服务器上的wp-admin中工作 - Wordpress: javascript not working in wp-admin on server wordpress wp-admin / php.ini未登录时导致空白页 - wordpress wp-admin/php.ini causes blank page when not logged in Wordpress 将 wp-admin 重定向到 wp-admin/wp-login.php - Wordpress Redirect wp-admin to wp-admin/wp-login.php wp-admin中的空白页 - blank page in wp-admin 如何在WordPress管理员post.php中传递额外的变量 - How to pass extra variable in wordpress admin post.php
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM