Due to … issues with my web host, I lost everything except a database backup. Is it possible to install EE as a new install, and either use the restored database or at least, import my content? My last used version was 3.5.x
I’ve been out of the web site hosting game for a few years, so treat me like a newbie here.
You certainly can use your DB to rebuild your EE installation, but you might need to do a bit of detective work to put back non-standard parts of your previous site, however some parts of your site may not be recoverable.
Here’s some thoughts:
Hope these pointers help - if you have any questions on this (quite possibly it is obscurely written…) or other questions not yet asked etc. post them here.
Once you have blank EE3 setup, find a MySQL tool (phpmyadmin, Sequel Pro on macos, … I’m sure there is something for Windows…, etc.) and open the EE3 database for the blank site, then restore the backup of your old EE3 site to the new database: the content of the new database will be updated with all the info from your backup, and then when you access the new EE3 site you’ll get access to the site data.
Couple of gotchas to bear in mind:
As ever if you are messing with a database make sure you are working from backed up copies… things can and do go wrong, and so having unsullied versions of the data for your old and new sites to go back to is usually helpful!
HTH
I had to set this aside for a while, because, you know … life. Tried to get it going again today, and still no luck. I installed EE from scratch with a new database. Everything seemed to be working. I could get into the Control Panel, and there was a basic page at my main site. I then imported my backup database and now when I try to access my site or my Control Panel, all I get is a blank page. I’m totally at a loss.
I dropped back and installed version 2.11.9 with a blank database. Again, everything was working until I imported my backed up database. I hoped that maybe going ahead and updating to 3.5.17 might work - I got a log in page, but I enter my user/pass and it just refreshes and the fields are blank again. If I enter the incorrect password, it says so, so I know I am using the right one.
At this point, I’d just like to get something running where I can export my blog entries and start over with something else.
Hi again
What you describe is actually pretty encouraging. That your installation is aware of your login password when you restore the database is to be expected, but also a good sign that probably it is mostly working OK. The challenge is getting past the white screen of death…
The WSOD is actually pretty common - unfortunately EE 3 is written in a way that means if EE looks for an add-on that is not there, or finds an addon installed that is for a different version (i.e. EE2) a lot of the time it doesn’t just fail with an error message, it bombs out completely and leaves you with the white screen.
Fixing WSOD can be done in a variety of ways, but the best probably would be for you to work out what add-ons EE is looking for and put the necessary files into the EE stack - even if they are not for exactly the right version, getting the files associated with some or all of the addons installed in the stack can make some or all of the WSOD errors go away. No guarantee that when you get past WSOD what you have will actually work, but it is much easier to debug / finish the work once EE is talking to you again.
There are ways to get the data from your site from the EE database via MySQL without restoring the site to a functioning state, but they are likely both more complicated and time consuming that working through the restore of the existing site.
Just one thing to remind you of - if you are doing things with your SQL file, make sure you have got a good copy stored safely somewhere else you can go back to - and only ever work from copies of it.
HTH.
Bless you for your patience with me on this. Thank you so much.
It’s been so long since I have used my site, I forgot exactly which version I was using last. It’s somewhere in the 2.x range, so I am going to try working with that. I was able to find and download version 2.11.9, but after installing that as new, then importing the database, I can’t do anything with it - I don’t even get a log in screen when I go to my site/admin.php. So, I hunted around some more and found a site backup that appears to be version 2.5.5 - it’s a straight up download of the system folder, and the config.php file lists that version. More digging on backup hard drives, I found an installer for version 2.8.1. I wiped everything else, installed that as new and it all works great if I set my host site to use PHP 5.4. If I use anything higher, it craps out. I tried updating the database.php file to point to my original database name, and it craps out. I tried renaming a restored copy of the database to the same as the one created for the EE install. No dice. Even running the install as an update doesn’t help.
So, I am wondering, is the EE version specified somewhere in the database, and that field gets updated when the update is run? If so, where? I speak fluent SQL (it’s my day job) so I am wondering if that can be updated to make the database and the EE installation speak to each other. Or make sure the EE version matches the database version. SO many moving parts!
I’m also wondering if my original database is corrupted somehow - I do have other backups that I can try restoring. But all database checks come back OK. I’ve not changed anything on it, only restored the copy on my hard drive to the new one created for EE installs.
Interesting progress - congrats!
Is there a reason why you didn’t just build a EE2.5.5 system to start with and restore your database to that?
There were eight updates to EE issued between EE 2.5.5 and EE 2.8.1 and within those many changes to the EE database and the methods it used - so it is not surprising if an EE 2.8.1 system fails when linked to an EE 2.5.5 database; presumably there are elements within the database that the php code for EE 2.8.1 assumes are present that are not - and (as noted in previous email) EE stylistically is prone to WSOD when it encounters such “does not compute” issues.
In passing, if you want to see what changes when an update happens, EE installers contain this information - the installer folder (in system/ee folder) has within it a sub-folder called “updates”. Each version change has its own file within that folder - so the instructions for the database changes made to go from EE 2.5.5 to EE 2.6.0 are in a file called “upd_260.php” - and if you can follow php code you can see the exact update instructions EE uses / used to make that change happen. These update files are preserved in later versions - so all the EE updates from upd_201 onwards are in the installer folder for every version of EE right up to EE 5.2.4 (latest) so you can do the detective work even if you don’t have a copy of every version of EE.
AFAIK the version number of the EE system a database is tuned for is not stored in the database (no idea why not), so working out what version of EE you have can be a bit of an exercise. One way is to look at the database changes implemented by the updater at key version changes (i.e. from 2.5.x to 2.6.0): look for a table or column that is inserted as part of the update. So, for example, the column named template_name was added to the table exp_developer_log as part of the EE 2.5.5 -> 2.6.0 update: if your database has this column within it, you know it is from an installation that was updated to at least EE 2.6…
Once you work out what version EE the database you have is associated with you can restore it to a suitable version of EE. If you don’t have access to a specific version directly, many people keep archive copies and so a request in a forum like this might get you a copy - or you can try to run the update process on the database for a close later version you do have access to - best to get as close as you can, because changes in php and addons also happened while EE was developing, and leaping too far might result in a copy of EE that works OK, but bombs because your add-ons are not compatible with it.
In passing - if you are having problems with WSOD search in this form and the EE area in stackexchange - there are many threads about fixing up WSOD issues; one dodge that is useful to file away is to empty (temporarily) the add-on folder (in EE2 its called *system/expressionengine/third_party) - even if they are not installed, add-on files in that folder are scanned / read by EE and if it can’t make sense of what it finds (you guessed it) it doesn’t show an error message, it gives you WSOD…) - so emptying the folder can sometimes get you past WSOD. Then you can add back addons one at a time until you work out which is causing WSOD… etc.*
Good luck! Post back if you have more questions or you find more things in your activities 😉 In the interim HTH
Sheewwwwwwwieeee!!! IT LIVES!!!
And the solution was so simple. While digging around to find a version 2.5.5 installer, I came across a simple file backup of my system folder on an old backup hard drive. With that, the images and themes folders from a 2.11 install, and some careful editing of admin.php and index.php, my site is back up and running, and playing nicely with this server’s version of PHP - 5.4. The issue that took the site down was from the hosting company updating PHP to 7.2, which did not play nice with EE 2.5.5. They have since installed a PHP Manager that allows me to select the version I want to use.
If this hadn’t worked, my next attempt would have been to install 2.8.1, get that up and running, then insert the data from the entry tables into the database. That was a tedious job I was not looking forward to. An alternative would have been to export the table data to a format that could be imported into EE, but that looked quite complicated too.
Now to add new channels for the projects I want to move onto. But my old blog lives! (My user name is my dot com, if you want to look)
Congratulations!
Glad you got to the bottom of things. I would strongly encourage you to think about updating your system to (at least) EE 2.11.9 - which will work with php 5.6 or 7.0 (though not 7.1 or better without some modifications). The updated system would be a bit faster and benefit from the many improvements and bug fixes that happened after 2.5.5 was released.
Updating beyond - to EE 5 ultimately - is perfectly doable too, but can be tricky if your site uses add-ons as many add-ons did not make the jump from EE2 to EE3 (which required some changes in how they were written), so the transition beyond EE2 sometimes involves some rewriting of your site’s templates either to use new features in EE 2 that allow you to work-around any missing add-ons or to implement the site using alternative ones to replace ones that you cannot update.
If you intend to continue to use and evolve your site it is well worth considering updating to the latest version as EE5 is really a lot lot better than earlier versions, just be aware that the migration is more complex than just running an updater.
I did have a look at your URL - unfortunately it was showing an EE error when I did so ;(
HTH
Gosh - I’m sad to hear that your work was all to no end. How frustrating for you.
I can totally empathise - the 2->3 upgrade can be a bear: the error messages and the WSOD experiences are demoralising, and because there is little ‘intelligence’ in EE’s upgrade process you get few clues as to what the issues are. Without doubt Ellis Labs could have done a much much better job of giving information about issues in the upgrade process within the CMS, but I’ve not come across a case yet where the issues cannot be resolved if you are methodical and patient to step through the kind of incremental debug processes described earlier and in other ‘how to fix upgrade problem’ posts here and in stackexchange.
Good luck with whatever you choose to do. If after a break you decide to have another go later, get in touch via the forum again if you need stuff.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.