[Resolved] Migrated to new Server – Cannot create new post/page
I recently migrated to a new server. Now I cannot write pages or posts on any of the blogs on the server (multiple versions).
The first problem I had was the inclusion of trailing slashes after apostrophes – so that if a post had the word “Don’t” in it, it would appear as “Don\’t” – similarly all HTML code in posts was messed up – for instance the code for an image includes img src=”bob.jpg” – that would be rendered as follows:
Needless to say images and other things were messed up. This was solved by turning off magic_quotes_runtime in my php.ini file. This error that showed up on my server error log:
Invalid argument supplied for foreach() in /home/user/wp-includes/capabilities.php on line 31
Stopped appearing. The sites looked fine and I thought we were all clear.
However, now when I got to /wp-admin/post-new.php or wp-admin/edit-pages.php when I write a new post or a new page it takes me back to /wp-admin/post-new.php or wp-admin/edit-pages.php and no new page or post gets created. I can create new categories without a problem.
To add another wrinkle to this equation, if I create a new blog on the same server, it works perfectly. I even went so far as to backup an affected blog’s database and files, deleting the account completely, recreating the account and restoring the database. That didn’t help either (Yes I had the plugins turned off before I backed up the database and I kept them turned off).
This leads me to believe that something went wrong with the database when I migrated servers. I’ve read about databases becoming messed up with extra characters or spaces when this happens – or the encoding gets messed up. My data is all in English.
The data on the affected migrated blogs is in UTF-8:
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_general_ci
It’s possible that the data on the prior server may have been in, what latin1 or something? And then maybe in the migration from one server to the other, the host had a newer version of MySQL that forced the database to be in UTF-8?
This is the only thing that makes sense and believe me, I know less than nothing about this sort of thing. I’ve eliminated all the obvious problems and I am pretty sure I have isolated it to a MySQL database issue occasioned by a server migration.
BTW I already tried modifying my wp-includes/wp-db.php as per this comment but that didn’t help.
So, WP Geniuses – Please for the love of God help me enjoy my vacation! I am in Thailand and am not doing anything fun. Just this stuff. And I really needed this vacation badly. HELP!!
- The topic ‘[Resolved] Migrated to new Server – Cannot create new post/page’ is closed to new replies.