icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Private Hosting » Moving WordPress

Private Hosting Questions about VPS, dedicated servers and colocation.

Reply
 
LinkBack Thread Tools Search this Thread
Old November 7th, 2007, 4:46 PM   #1 (permalink)
Registered User
Seasoned Poster
 
Joined in Jul 2004
Hosted on Pass9
65 posts
Gave thanks: 3
Thanked 2 times
Moving WordPress

Hi,

I'm moving back my WordPress blog from Dreamhost. I'm stuck with an error.

Here's what I've done so far.

- Backed up my database
- Copied everything in the wordpress folder to my local hard disk
- Uploaded everything to my new VPS
- Fixed wp-config.php for the new database name
- Restored the database from my backup

When I try to access my site I get the following error:

Code:
Warning: Invalid argument supplied for foreach() in /home/trikis/public_html/wp-includes/classes.php on line 92

Warning: Cannot modify header information - headers already sent by (output started at /home/trikis/public_html/wp-includes/classes.php:92) in /home/trikis/public_html/wp-includes/pluggable.php on line 391
I've tried several things but still no joy. Some of the results make me think it's an encoding problem but would like to know if someone knows about other options besides this document that explains how to convert a sql dump from one encoding to another.

Any help would be greatly appreciated.

Felix.
__________________
-----------------------------------
Reseller, pass9 and pass28
-----------------------------------
felixe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 7th, 2007, 5:57 PM   #2 (permalink)
ceo
Senior Member
Super #1
 
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
It's been ages since I've moved my WP blog to a new site

If I recall properly you'll need to fix your siteurl in your MySQL database.

Unless they changed it, there are two instances in the wp_options table that direct WP to where your website is. Try editing that.

If that doesn't work, let me know!
ceo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 7th, 2007, 6:12 PM   #3 (permalink)
ceo
Senior Member
Super #1
 
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
Ok, I researched a tiny bit more and the most consistent suggestion I have come across is to try to reupload a fresh copy of your classes.php and pluggable.php -- something just might have barfed during uploading and downloading and all that.

If it still doesn't work, try grabbing fresh files from here.

Make sure to delete and upload, don't overwrite.
ceo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 7th, 2007, 9:46 PM   #4 (permalink)
Registered User
Seasoned Poster
 
Joined in Jul 2004
Hosted on Pass9
65 posts
Gave thanks: 3
Thanked 2 times
First option (fix the site's URL inside WP admin panel) is out of question. The domain is the same and with these errors I'm not able to access the admin interface.

Second option. Deleted classes.php and pluggable.php inside wp-includes and re-uploaded them. Problem still persists. Downloaded a fresh WordPress 2.3.1 zip file and extracted those 2 files to my wp-content folder on the server. Problem still present. Even uploaded a tar.gz version of WP and extracted it to my public_html folder and same result.

I still suspect it's an encoding issue. For example, I can do a fresh WP install and everything works. Then I can import only my wp-posts table and I get my posts but with some weird characters in place of accented letters and such.

The problem here is when I try to import a specific table (still haven't figured out which one) that WP crashes and I believe it's crashing when trying to read a string with improperly encoded characters.

And going a little bit deeper, if I browse my tables with phpMyAdmin I can see those extended characters with the wrong encoding.

I think I'll try some of the suggestions on the link I posted before. They sound really involved but I guess that's the only way.

Thanks anyway,
Felix.
__________________
-----------------------------------
Reseller, pass9 and pass28
-----------------------------------
felixe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 7th, 2007, 11:01 PM   #5 (permalink)
ceo
Senior Member
Super #1
 
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
I missed the bit below the quoted error.

If that's the case, yeah I think you're right it's probably an encoding thing. Have you tried searching the db backup itself for the encode issue? I don't know how much of this there is but you could always manually add back the bits; though if we're talking every post out of a thousand, uhm, nevermind.

I wish I had more insightful help.
ceo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 7th, 2007, 11:12 PM   #6 (permalink)
Registered User
Seasoned Poster
 
Joined in Jul 2004
Hosted on Pass9
65 posts
Gave thanks: 3
Thanked 2 times
It's a big database, around 2700 posts and their respective comments. I read about a guy who did the search and replace thing but this clearly is going to take ages.

Maybe I can try to tweak the php.ini file so I can raise the limit for uploading and upload and import a WP dump instead of a sql dump.

Where can I put a per-user php.ini so I can modify it accordingly?

Thanks ceo for your interest.

Felix.
__________________
-----------------------------------
Reseller, pass9 and pass28
-----------------------------------
felixe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 9th, 2007, 1:27 PM   #7 (permalink)
Registered User
Comfy Contributor
 
Joined in Dec 2006
Lives in North Carolina, the suck ass state...
152 posts
Gave thanks: 8
Thanked 3 times
The easiest way I know of is to do a fresh install of WP and then restore the database only and change the site url fields to fit the new domain. It's worked for me XD.
Otaku is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 9th, 2007, 5:47 PM   #8 (permalink)
ceo
Senior Member
Super #1
 
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
Quote:
Originally Posted by Otaku View Post
The easiest way I know of is to do a fresh install of WP and then restore the database only and change the site url fields to fit the new domain. It's worked for me XD.
Gah, you beat me to this suggestion.

There's DB backup plugin that might work perfectly for you. I'd completely forgotten about it 'til I saw the note in my dashboard it had another update recently.

Hope that works for you and eases the burden of this whole thing. Best of luck!
ceo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On