INDEX | RULES & INFORMATION | SUPPORT FORUM | DOCUMENTATION | SEARCH | MEMBERS | TWITTER | TERMS


 
Add Reply
New Topic
New Poll

 Rescuing old Wordpress database
Chakka
 Posted: Jan 25 2014, 02:39 PM
Quote

185 POSTS
28 YEARS OLD
N/A
09/29/2013
Male
Offline



Hey, I was wondering if anyone could help me with a tech issue tongue.gif

Basically, I have an old server I used to run a Wordpress based blog/site off of with some friends. The servers been offline for years, due to a licensing issue with the software and then compounded with hardware issues... but I've just managed to get back onto the hard drive so I can pull the files. That's all well and good, however, I can't work out how to actually get the article text (all I really care about) back off the server. Naively, I had assumed that I would just need to copy and paste out the MySQL database into a new version of WordPress or something... but no tongue.gif

So yeah, does anyone have any ideas how to do this? The server cannot go online due to hardware problems so I can't simply open the website and copy and paste them from there. I would like to remove all the files that made the blog and just rehost them somewhere else, ideally, but when I try to do that locally I've found the code has deprecated quite a lot :S And I can't find a way to get WAMP/EasyPHP that has the older version of PHP/Apache etc. for me to test that...

Even if someone knows a way to get a wordpress database to work on a new install, that would be fine wink.gif

Any help here would be greatly appreciated happy.gif

EDIT: Would still like any suggestions on getting the site itself back/viewable on a local host basis but currently have worked out how to re-group all the MySQL stuff into a new database and am going through exporting the useful information tongue.gif

This post has been edited by Chakka: Jan 25 2014, 04:40 PM
PM
^
kesha
 Posted: Jan 25 2014, 11:13 PM
Quote

61 POSTS
27 YEARS OLD
Massachusetts, USA
12/21/2013
Male
Offline



What should work is install the version of wordpress that the data you have for used, then have it use that database/table-prefix. From there you should be able to upgrade it to the latest version.

_______________________________________________

user posted image

Experience with Invision Power Board 1.x since 2003
PMEmailWebsiteGTalk
^
Chakka
 Posted: Jan 26 2014, 09:37 AM
Quote

185 POSTS
28 YEARS OLD
N/A
09/29/2013
Male
Offline



That would be fine if I could get that version of wordpress to install on any localhost servers (i.e. WAMP, XAMP, EasyPHP etc.) but the code it's built on uses seriously deprecated PHP and SQL queries and so all I get back is a page of gibberish and error codes. In order to install wordpress I would need to downgrade my PHP version, and probably MySQL too. As a result I also require an old version of Apache, and that's where the problem comes in. WAMP lets me install old versions but, although the options I need are available, it has an issue with version switching in bounds and... basically it's not possible.

The only solution I can see is finding a legacy installer that will, out of the box, net me a version of local server software with Apache/PHP/MySQL version from half a decade ago, but so far no luck on finding anywhere that has that...
PM
^
kesha
 Posted: Jan 26 2014, 01:06 PM
Quote

61 POSTS
27 YEARS OLD
Massachusetts, USA
12/21/2013
Male
Offline



Deprecated functions are in the process of being replaced, and it is not recommended that you use them; they will still work. Warnings will pop-up about them, sure, but you can always disable warnings.

Versions of XAMPP go pretty far back if you want to try installing one of those. I don't know if there's an easy way to find out which versions of PHP or MySQL they run, however.

Another option you have is using virtual box or a similar software to install an older release of a GNU+Linux distro that has the older versions you need. Once again, I don't know if there's an easy way to see what versions of PHP or MySQL they run, but overall if you have a rough estimate of the date it shouldn't be too hard to get the correct one.

_______________________________________________

user posted image

Experience with Invision Power Board 1.x since 2003
PMEmailWebsiteGTalk
^
Chakka
 Posted: Jan 26 2014, 01:51 PM
Quote

185 POSTS
28 YEARS OLD
N/A
09/29/2013
Male
Offline



Hmm, hadn't found that XAMPP page, will have a look into that at some point. Though it intrigues me that you reckon I can get around the deprecated code issue, might just give this another shot on WAMP (seeing as that's already installed and working tongue.gif) Thanks for the responses so far happy.gif

EDIT: Okay, so I've managed to get the old install of Wordpress running but I cannot get my old database to match up with it, any suggestions? I currently have access to it within phpMyAdmin, it's all there, but need to get it imported into the WP database. Basically, any idea what file types I could export it from phpMyAdmin in order to import it to WP? Thanks again!

This post has been edited by Chakka: Jan 26 2014, 02:32 PM
PM
^
kesha
 Posted: Jan 26 2014, 02:39 PM
Quote

61 POSTS
27 YEARS OLD
Massachusetts, USA
12/21/2013
Male
Offline



I'm a bit confused by what you mean here.

A MySQL dump is just a text file with the SQL commands to import the same table structure and data into a MySQL database. Are you trying to export from phpMyAdmin and then are looking for a way to import that dump directly into Wordpress? That won't work; you'll need to import the MySQL dump into your local MySQL database- you should be able to use phpMyAdmin for that as well.

From there all you should need to do is update the Wordpress configuration to use the database (and/or table prefix) that the data you just imported is using. Wordpress might store some URLs in the database as well, so you may have trouble accessing the ACP unless you look around in the database and tweak some things.

Hopefully this makes sense.

_______________________________________________

user posted image

Experience with Invision Power Board 1.x since 2003
PMEmailWebsiteGTalk
^
Chakka
 Posted: Jan 26 2014, 02:57 PM
Quote

185 POSTS
28 YEARS OLD
N/A
09/29/2013
Male
Offline



To clarify, Wordpress has a feature (in the ACP) to import posts/users/comments, which would be ideal right now, but it requires a .WXR file (which I don't have). There are other filetypes that work through that import page, but again not sure if any would work. I was wondering if phpMyAdmin could take the old database and export it as .WXR or any other usable filetype, so I could import it into the new database.

As for your suggestion, I think I'm confusing you because I have very little idea what I'm doing tongue.gif I currently have two databases on my localhost, my old blog pulled from my server and the new local WP install. I want to add the data from the old blog database into the new local WP install database. Is it going to be as simple as changing which database the WP config file is pointed at or will that screw everything up? Does that make more sense?
PM
^
kesha
 Posted: Jan 26 2014, 03:03 PM
Quote

61 POSTS
27 YEARS OLD
Massachusetts, USA
12/21/2013
Male
Offline



Ok, yeah. You're probably only going to be able to create WXR files from Wordpress.

As long as you don't need any data from the new install (which you shouldn't, it is a brand new install right?) switching the config over should work fine. However, the old URLs may still be in the old database, and that could cause problems with things like accessing the ACP. I'd recommend not touching those things until you're sure they don't work though.

_______________________________________________

user posted image

Experience with Invision Power Board 1.x since 2003
PMEmailWebsiteGTalk
^
Chakka
 Posted: Jan 26 2014, 03:15 PM
Quote

185 POSTS
28 YEARS OLD
N/A
09/29/2013
Male
Offline



Well I tried and it definitely looks like there are issues tongue.gif It's managing to fetch parts of my old theme and parts of some pages but absolutely no post content (that is visible). I'm going to try playing around with some values, reset the theme, that kind of thing smile.gif

EDIT: And a bit more of an update happy.gif Changing the theme has caused Post and User content to return, tweaked a couple of other things and got links back too. Still not greatly functional but at least it appears to be working! Will see what else happens but thank you so much for making me re-try that and helping me understand some parts, this is much further than I expected to be able to get already biggrin.gif

This post has been edited by Chakka: Jan 26 2014, 03:17 PM
PM
^
kesha
 Posted: Jan 26 2014, 05:59 PM
Quote

61 POSTS
27 YEARS OLD
Massachusetts, USA
12/21/2013
Male
Offline



That's good to hear, your main goal was to extract the content right? I wouldn't recommend running what you have working live if you can- if there's a few broken things, more are to follow...

As a backup plan for that, if any of this didn't work we could always try to extract the data from the MySQL dump- it's likely a bit messy but overall the data should all be there without encryption or anything like that... Not the *best* option but one to consider.

I don't have any direct experience with this kind of thing myself, but I've used plenty of PHP-MySQL applications and they generally work the same way when it comes to that kind of thing. Additionally, I was on a project that involved upgrading a few web applications and while I didn't work on the Wordpress portion of the project myself I was in close contact with the person who was working on that so I have a rough idea of what was done....

_______________________________________________

user posted image

Experience with Invision Power Board 1.x since 2003
PMEmailWebsiteGTalk
^
Chakka
 Posted: Jan 26 2014, 07:25 PM
Quote

185 POSTS
28 YEARS OLD
N/A
09/29/2013
Male
Offline



Yep, primary goal was just getting the content back, so thank you immensely for guiding me to a solution for that. I'm probably going to mess around with the blog and try and get it working on a modern Wordpress install over the next few weeks, but I'm in the process of backing up everything at the moment to make sure I never have to start from that point again tongue.gif

As for your backup plan, I'm glad it didn't come to that but think I had started to find my way towards doing that before you commented. Like I said, glad it didn't come to that, definitely a bit over my head tongue.gif

Thanks for your help happy.gif Really wish there was a +rep feature or something right now tongue.gif
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Technical Discussion | Next Newest »

Topic Options
Add Reply
New Topic
New Poll


 


 


Latest Shouts In The Shoutbox -- View The Shoutbox · Rules -