新服务器 - 无法创建wordpress页面 - 空白/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. 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. 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.

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)

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. One additional note, my previous server was version 5.2.17 to 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. Once added I was able to create and alter pages on the backend of WordPress without issue.

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

@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. and than re-upload the 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. 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. In this example, it's 'wp-config', but it could be really anything.

PHP Warning: Cannot modify header information - headers already sent by (output started at /[server info]/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. Just create a new .php file and paste your post.php code in that file. Now save this file and replace this new one with old post.php.