Support » Fixing WordPress » Server error when trying to edit posts and pages

  • Resolved soulstar


    Hi – I hope someone can help me or at least give me some clues about the problem I’m having.

    A couple of weeks ago I upgraded a WP install from 2.2.2 to 2.5.1, and discovered that every time I try to edit an already existing post or page, I get a 500 Internal Server Error (on the page `/wp-admin/post.php?action=edit&post=3&message=1&_wp_original_http_referer=`) although when I go back and check, the changes I make have actually saved. I wondered if it was a problem because of the upgrade and deactivated all my plugins, but I wasn’t able to solve it. However, it’s only a testing site, so I wasn’t too worried.

    Today I did a brand shiny new clean install of 2.5.1 on a brand shiny new hosting account – no plugins, nothing already existing except for the default first post and about page that WP includes. But again, if I try to edit the existing post or page, I get the 500 error. My error logs tell me nothing more helpful than
    [error] File does not exist: /home/hastwell/public_html/500.shtml, referer:

    This isn’t so much of a problem for me since I know that the edits are actually saving, but I can’t set up a site for a client with this happening. Anyway, the server I have it on is running the following:
    Apache version 2.2.6 (Unix)
    PHP version 5.2.5
    MySQL version 5.0.45-community

    Any ideas, anyone? Thanks in advance!


Viewing 8 replies - 1 through 8 (of 8 total)
  • More on this – I tried upgrading to 2.6 and still had the exact same problem. I’ve downgraded to 2.3.3 and all is fine … but of course that’s not my ideal situation 😉

    Having looked at the changelogs for 2.5, I see that the code for redirecting after saving on the post.php and page.php pages have been changed and standardised, so I guess that’s where the hiccup is happening. Apparently my server doesn’t like the new code. Can anyone give me any more info on this so that I can try making some reasonably sensible requests of my webhost to see if I can get the problem ironed out that way?

    With fingers crossed (except when I’m typing),


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Are you running mod_security on Apache, by any chance? Might try disabling it in the admin screens.

    Create an .htaccess in wp-admin and add this to it:

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off

    Hi! I sure hope I’m in the right neck of the woods because with the WP 2.6 upgrade, after making the post and trying to get back to MANAGE POSTS, while the post is listed on the list and showing up out on the blog, this is what I see trying to re-edit individual posts:

    Fatal error: Call to undefined function: wp_text_diff() in /home/tomstech/public_html/wp-admin/edit-form-advanced.php on line 29

    We’re having this trouble on our blog and a clients blog. We can revert him back to 2.5 easily enough, but our system will not let us revert (and we’re got over 100 posts and hundreds of comments I would not want to lose).

    I’m an edit freak and really, really need to be able to revisit each post for further editing.

    Help? Will your solution above solve our problem?

    I’ll be watching with fingers crossed you have the solution!

    Thanks ahead of time!

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    @oimdiane: Next time, start your own thread instead of hijacking somebody elses.

    Also, your problem is that your upgrade is incomplete. Reupload ALL the WordPress files. Especially all the ones in the wp-includes folder.

    Thanks Otto42 – doesn’t look like that’s it, though. However, I have done a test install of 2.6 on my other host which behaved just as it should, so I can at least go to host no.1 and tell them that. Perhaps they’ll have some ideas.

    oimdiane – I don’t think your problem is the same as mine: mine seems to be something that my server isn’t doing. Yours looks like a problem with the code on the page /blahblah/edit-form-advanced.php – have you tried deleting that page from your server and re-uploading it, or since you’re having problems with both your site and your client’s, re-downloading WP to make sure that you’ve got a correct copy of that page. I know that’s probably really obvious advice though (and I’m clearly not one to talk). However, I think I have seen others with similar difficulties when I’ve been searching here, so it’s worth having a rummage about. Good luck!


    @otto42 – just to clarify, I tried the .htaccess solution you suggested. I’m not actually sure if I have mod_security running, but I’ll check with my host. Thanks again!

    @otto42 – I’ve just heard back from my hosting company and you’re quite right, it is the mod_security on Apache that’s causing the problem. (To quote “As your URL string contains two http:// calls, the server blocks the request as it suspects that the software is attempting to run an exploit, by calling a third party website to download potentially harmful material onto the server.”) However, they don’t allow that to be turned off with .htaccess, hence your fix not working. They are going to run some updates on the servers though, which should solve things. Thanks for pointing me in the right direction – I’m sure it wouldn’t be on the way to being sorted out so quickly otherwise!


    @otto my sincere apologies. I thought the title of the post encompassed all issues about posting and editing. I would never have dreamed of ticking you off by posting in the wrong spot. Just thought I was on target with the same type of issue.

    I do appreciate you taking the time to give me some sense of direction with our similar posting and editing problem.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Server error when trying to edit posts and pages’ is closed to new replies.