DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Site Building & Maintenance

Reply
 
Thread Tools Display Modes
Old 05-13-2008, 09:25 AM   #1
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default Murdered a WordPress site. Advice?

Yesterday I updated my WordPress 2.5.0 site to 2.5.1 after reading a dire warning of a security threat.

I thought I was being careful, but made (at least) two mistakes:
  • I somehow uploaded half the files to the server root, the other half to the public_html area where they belonged. Since I had not started by deleting the files, that left the update cockeyed, with roughly a third of the files from version 2.5.0, the rest in 2.5.1.
  • I did not modify and upload config.php. Should have — that’s where the security change was. I was supposed to insert a secret code and re-upload the file.
Anyway, although I could get at the admin area, my WordPress site would not work:
  • First got an error message that let me discover the mismatched version files. So I fixed that, but evidently it was too late, and I was stuck with the wrong file (even after clearing the cache in two different browsers).
  • So I Googled on the error, found links at WP forums, one of which suggested using the WordPress Automatic Upgrade plug-in to fix it. Ran it. Errors right and left. Tried to solve them, and when it still wouldn’t work, noted that the plug-in had been tested only up to 2.5.0. So I deactivated and deleted it from the server.
Feeling fairly stupid at this point. I decided to delete everything except my theme from the server, then reupload everything new. Being extra careful this time, I found the new config.php text, so even that got uploaded.

No dice. Now I get a page full of errors, all saying more or less the same thing (but referencing different line numbers):
Warning: Cannot modify header information - headers already sent by (output started at /wp-config.php:44) in /wp-login.php on line 202 [214, 557, 694].
Which is where I am now. I guess that plug-in worked well enough to start something but not to finish it.

What is the easiest way to restore my poor site? I do have a backup of the MySQL file.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 05-13-2008, 12:09 PM   #2
Kelvyn
Staff
 
Kelvyn's Avatar
 
Join Date: Feb 2005
Location: In the Heart of the English Lake District
Posts: 1,381
Default

You don't have a full site backup? Not even the last working config.php? Does the host run routine site backups?

If noy, you could try a full fresh install of WP2.5 get that running with the same plugins as you had before and then use phpMyAdmin to copy your old MySQL over the new. Never had to do this, but I think it will work.

Good thing about UH is that all sites have a full backup every 6 hours and the backups are kept for 2 weeks. Never had to use it though, and it is of no help to you...

   
__________________
Kelvyn

Web site design, hosting and marketing, Keswick in the UK Lake District

If you are planning a visit to Keswick then try Keswick Tourist Information website

Kelvyn is offline   Reply With Quote
Old 05-13-2008, 12:47 PM   #3
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

Quote:
Originally Posted by Kelvyn View Post
You don't have a full site backup? Not even the last working config.php? Does the host run routine site backups?
Ah, what a clever idea. Yes it does, and I have written to ask if they have a recent one before I messed this up yesterday. And yes, I have config.php.

I backed up the DB today, stupidly over-writing the one before it (I know, dumb). And I have backups of my postings, though not in WP form exactly, but there were only about a dozen, so I can fix that.

Quote:
If noy, you could try a full fresh install of WP2.5 get that running with the same plugins as you had before and then use phpMyAdmin to copy your old MySQL over the new. Never had to do this, but I think it will work.
Let’s hope I don’t need to do that!

Quote:
Good thing about UH is that all sites have a full backup every 6 hours and the backups are kept for 2 weeks. Never had to use it though, and it is of no help to you...
I know, I know.

I found two DB tables in need of repairing, and repaired them, but it didn’t help.

WordPress advice is to clear the DB tables, then rebuild them. If need be, I will do that. From scratch. Grump. This was almost entirely of my old devising (although I am not the only one complaining about problems with the 2.5.1 upgrade, I probably would have escaped in decent health if I hadn’t tried to get clever).

Thanks.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 05-13-2008, 03:09 PM   #4
Kelvyn
Staff
 
Kelvyn's Avatar
 
Join Date: Feb 2005
Location: In the Heart of the English Lake District
Posts: 1,381
Default

Quote:
Originally Posted by ktinkel View Post
I am not the only one complaining about problems with the 2.5.1 upgrade, I probably would have escaped in decent health if I hadn’t tried to get clever
Very likely - always take the easy route, and as I keep telling people, BACKUP whenever you do an upgrade. I just patched a couple of files for the moment. I'll run the full update on my 3 WP installs when I have 10 minutes to spare.

   
__________________
Kelvyn

Web site design, hosting and marketing, Keswick in the UK Lake District

If you are planning a visit to Keswick then try Keswick Tourist Information website

Kelvyn is offline   Reply With Quote
Old 05-13-2008, 05:32 PM   #5
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

Quote:
Originally Posted by Kelvyn View Post
Very likely - always take the easy route, and as I keep telling people, BACKUP whenever you do an upgrade. I just patched a couple of files for the moment. I'll run the full update on my 3 WP installs when I have 10 minutes to spare.
I did back up, but I suspect I do not know how to back up everything.

That is, I backed up the WordPress files that I could see in the server; and I backed up the MySQL database. But I think the backups were already contaminated.

In any event, the host is being helpful. And I grabbed the wp-post table, confirmed that I had the text, and have the theme and its files, so know that I can recreate the site without too much more difficulty.

If only it would stop refusing to deal with me!

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 05-13-2008, 07:43 PM   #6
cdanddvdpublisher
Member
 
Join Date: Feb 2008
Posts: 134
Default

Quote:
Originally Posted by Kelvyn View Post
Very likely - always take the easy route, and as I keep telling people, BACKUP whenever you do an upgrade. I just patched a couple of files for the moment. I'll run the full update on my 3 WP installs when I have 10 minutes to spare.

It's important advice - advice that I admit I haven't always followed. Since I still haven't upgraded a couple of installations and I've been seeing a number of challenges that others are facing, I'll be sure to do a backup first

   
__________________
CD and DVD Publisher
XLNT Idea
My Blog
cdanddvdpublisher is offline   Reply With Quote
Old 05-15-2008, 09:47 AM   #7
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

In case anyone is interested:

I screwed up the WordPress installation in the first place through good old-fashioned hubris leading to carelessness leading to blind panic.

I repaired some MySQL database tables that were marked as in need of repair. And deleted all the WordPress files from the server, downloaded a fresh copy of the 2.5.1 update, and uploaded again, this time being careful to use the new config.php. Got the same error as before.

Checked to make sure I had copies of my posts, then dropped all tables in the database. Still the error persisted.

Asked the host to restore my site from May 10 (before the mess, IOW). They told me to do it myself, using the PC-Restore utility on the server. It was taking forever; I went to bed. Next morning, same error message. Looked at the restore utility and found error logs saying the old files had not been overwritten. So I deleted the files again.

Then I again dropped all the database tables. Belts and suspenders this time. And then I uploaded another clean set of WP 2.5.1 files.

Fingers crossed, holding my breath, I went to the site: Perfect. Ugly old Default theme, none of my edits, but everything worked.

So since then (yesterday mid-morning) I have been carefully rebuilding my site.

If I had had a perfect and complete site backup — and if I had thought of using it and if I had been able to find it — I suspect I could have fixed this thing in less than an hour. Even if I had given up and used a 2-week old backup in the first place, I would have lost very little, since I had done very little (if anything) to the site in the meantime. But I got hung up thinking about the error and solving it, which was my dumbest mistake of all.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 05-15-2008, 11:05 AM   #8
iamback
Member
 
iamback's Avatar
 
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
Default

I'm coming to the conclusion that the most important skill to have with any content management system (and a blogging platform is a CMS) is knowing how to recover when things go wrong.

It's great to hear you did recover, though tediously and slowly. I'm sure you learned a few things in the process.

Meanwhile I was forgetting all about your troubles while trying to set up a CMS for my new site - really jumping in with Xaraya this time (which I've dabbled in before, which helps). Setting up "roles" and "privileges" is a headache (still) and what I remembered didn't help so after a morning's work I managed to completely lock myself out. No problem, I thought, because I'd set up the "last resort" admin account which is supposed to get you in no matter what. Guess what: logging in with that cause Xaraya to crash and completely lose its user interface. I had to recover - both from that crash and from locking myself out! - by manually editing database records - but I knew what to look for since I'd poked round in there already for a few hours (and I know how databases work). My greatest progress today is learning more about how it works at the database level - and reporting a bug about the crash. Baby steps now, but I think I've sussed it.

Learn from your mistakes is the moral of the day, I guess

   
__________________
Marjolein Katsma
Look through my eyes on Cultural Surfaces (soon!), My ArtFlakes shop and Flickr.
Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog
iamback is offline   Reply With Quote
Old 05-15-2008, 12:36 PM   #9
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

It is unkind of me to say so, but if you can get in a pickle then I don’t feel quite so bad.

Still kick myself for not thinking first, then acting. But as you say, I may have learned something in the process.

One good thing: I had wrestled a theme into submission on that site, and it wore me out. I decided to leave as much of it alone as possible this time; editing .php is tedious, especially when you know you may have to do it all over again after a major update. So I am carefully adopting only some of my many changes from before.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 05-15-2008, 01:40 PM   #10
iamback
Member
 
iamback's Avatar
 
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
Default

Quote:
Originally Posted by ktinkel View Post
It is unkind of me to say so, but if you can get in a pickle then I don’t feel quite so bad.
<chuckle/> Don't feel bad - we all make mistakes... (Here's a great post by Chris Heilmann that I just read about that: In praise of mistakes.)

The thing is, I was mighty pissed, but having poked around in the database I knew I could recover - I never felt I was losing control, it was just a major annoyance. It's my silly time-consuming RTFM-and-poke-around tactic that saved the day this time (so I'll stick with it): I was prepared. And the bug wasn't my mistake - it was my mistake that showed it up - so hopefully the bug report is actually useful. Nevertheless, it took hours.

Quote:
One good thing: I had wrestled a theme into submission on that site, and it wore me out. I decided to leave as much of it alone as possible this time; editing .php is tedious, especially when you know you may have to do it all over again after a major update. So I am carefully adopting only some of my many changes from before.
That's the way it usually works in development - first you do a lot of work to get where you want to be - but when you have do it again you find the better shortcut. Simpler is (almost) always better, but you need to have done the "not so simple" to know what "simpler" is!

Talk about "wearing out" though - I haven't finished my roles and privileges today, as I had planned - and it's nowhere near my bedtime but I am worn out trying to get my brain around it (again). I guess I'll have a beer, and a sudoku, and then go to bed (um, hammock)!

   
__________________
Marjolein Katsma
Look through my eyes on Cultural Surfaces (soon!), My ArtFlakes shop and Flickr.
Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog
iamback is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interesting hosting advice site ktinkel Web Site Building & Maintenance 12 03-31-2008 07:23 AM
WordPress 2.2.1 available ktinkel Web Site Building & Maintenance 20 06-23-2007 11:58 PM
Wordpress 2.1.3 released Kelvyn General Publishing Topics 0 04-03-2007 02:00 AM
Upgrade your WordPress now! Kelvyn Web Site Building & Maintenance 4 03-12-2007 07:13 AM
WordPress - getting my feet wet ktinkel Web Design 45 12-13-2006 11:25 AM


All times are GMT -8. The time now is 04:51 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.