Jump to content

Migrating complete site


msummers
 Share

Recommended Posts

I have inherited a ProcessWire site that was still in development when the webmaster was abducted by aliens. Forunately I have a zip file of the SQL dump and all of the files. I want to bring that dev site live (not public) so that I can complete development. Although I have not used ProcessWire in the past, I'm pretty good with Wordpress and after going through the PW documentation feel like I could pick the system up pretty fast. Here are my questions - I'd really appreciate any suggestions or help with them:

  1. I'm not sure what version of PW was running on the old server. How can I tell?
  2. I have not yet repointed the legacy domain name to the new nameservers so I am only able to access the new dev site by IP address - is this going to be a problem?
  3. What sequence of events should I follow to bring the old site up on the new server?

For further context, I have created a database on the new server, changed the site/config.php file to reflect the new database properties and authentication, executed the SQL dump into the new database and copied the remaining files onto the new server. When I browse to the IP address, I just get a 404. Have I missed a configuration setting somewhere? Or is this related to the ip address for the new location?

Thanks much in advance. I'd love to get the site functional on the new server if I can...

Link to comment
Share on other sites

I recommend the following steps:

  1. make a new clean install of PW
  2. put your templates, assets, modules in the site folder
  3. download Ryans Module Database Backups here: http://modules.processwire.com/modules/process-database-backups/
  4. go to Setup > Database Backups > Upload
  5. upload your sql

If necessary reset admin password with the following code in your home template

$users->get("admin")->setOutputFormatting(false)->set('pass', 'newpassword')->save();

look what happens. If needed switch on debug mode to clean-up your templates

$config->debug = true; // in config.php

Add your IP adress to HTTP hosts whitelist

$config->httpHosts = array('xxx.xxx.xxx.xxx'); // in config.php
  • Like 6
Link to comment
Share on other sites

Thank you so much for your helpful response. It has gotten me well down the road. I am still having issues, though:

1. I do not see the correct pages in the page list. For example, on the original dev site, there is "About Us" with 2 children (About and Team). On the new dev site, there are also 2 childen for About Us, but they are "Child Page example 1" and "Child Page example 2".

2. The pages that are there appear to have some of the correct layout elements (logo, background colors/images, etc.) but they do not have the sliders or the correct column layout.

3. I have a feeling that this is because I selected the default conmfiguration when I first installed ProcessWire. Could that be the problem?

4. Finally, how can I determine which version of PW is running on the original dev site?

Thanks again for any suggestions!

Link to comment
Share on other sites

That's a good idea - unfortunately unless you can tell me how to edit those files from within the PW admin, I'm out of luck! I don't have file-level read/write permission to get at these legacy files otherwise (and not even sure I could do it then)! :(

Is there a Readme file or something that could tell me?

Link to comment
Share on other sites

i think he wants to get the version of the old installation which is not running (only html + sql, right?)...

you can find the old version number here

/wire/core/ProcessWire.php:
   32  class ProcessWire extends Wire {
   33  
   34 	const versionMajor = 2; 
   35  	const versionMinor = 6; 
   36  	const versionRevision = 1; 

3. I have a feeling that this is because I selected the default conmfiguration when I first installed ProcessWire. Could that be the problem?

was also my guess but i don't know to be honest. i would try it with blank-profile.

good luck!

edit: in admin you see the version on the bottom left corner

post-2137-0-20200900-1445556031_thumb.pn

  • Like 1
Link to comment
Share on other sites

The legacy version has had the Admin modified so that I don't see that information!

But - the ProcessWire.php reveals that it's v2.3.0 - so, I wonder if any of my issues are caused by trying to use the 2.3.0 files (templates, modules, probably not assets) in my 2.6.1 installation?

Link to comment
Share on other sites

I really don't know where to go from here.

First: were you able to get a clean install running?

Do that. Get your permissions set up http://processwire.com/docs/security/file-permissions/

Also there is a different setup if your Apache is version older than 2.4. It's commented in the $root/.htaccess file. Checkout lines 52-75. It explains there.

I'm sure we can all help you get this up and running soon!

hang in there ;) 

  • Like 1
Link to comment
Share on other sites

@Organized - Thanks for your optimism! I'm in fair shape. I was able to get a fresh install (2.6.1) running, copied the modules, assets and templates from the old site (2.3.0) into the new one. When I browse to the new site now, I see some things correct (background images, and colors), but I don't see others at all (sliders, correct pages in menu, regions of background images in body, content, etc.). I suspect that at least some of this is due to my selection of the default profile when I did the 2.6.1 setup. My next step will be to change that profile to the blank one (using that Migrator app - do you have a better suggestion?) to see if that helps. But I'm getting the feeling that I may have to copy fields and set up each template manually (and maybe modules too). Is that correct?

The permission problem is on the legacy site, not the new one, and I'm not sure about Apache versions but I'm pretty sure .

@Peter - Thanks for your welcome and suggestion. I will definitely bring in that template editor module!

Link to comment
Share on other sites

I would do a blank Installation of a pw 2.3 (you find the old versions on github) and change the site folder like explained above. A new installation is a matter of minutes. Trying to replace the profile is more pain I think.

When you have your 2.3 site running I would install http://modules.processwire.com/modules/process-wire-upgrade/ (it says it is compatible with 2.3) and let it do the upgrade for you

  • Like 2
Link to comment
Share on other sites

database backup/restore seems to be 2.5+ so it could get a little tricky to get the old data into the new installation. i would go with kixes solution but start over with a blank profile :) i'm still confused what was the problem with only using all the files + db dump...

good luck and also welcome to the forum :)

Link to comment
Share on other sites

I don't want to really confuse things here now, at this stage, but in this situation I would always recommend looking at everything you already have, and get that working first. Troubleshoot any and all problems that occur. Once that's stable and functioning, then go about upgrading and/or continuing development, saving progress or backing up as you go.

That advice is not just relevant to ProcessWire, but whenever inheriting projects of any type. From experience, this minimises debugging and troubleshooting time, and the wondering if a particular problem was there previously, or if it's related to the new environment or upgrades. If any problems in upgrades or development do occur, you've only got one step (the last one you did!) to undo and get back to the last working state.

I think using new versions and/or tools, in this situation and in this way, introduces several (unnecessary) points of failure which may not be immediately obvious and would only serve to throw spanners in the works :)

  • Like 1
Link to comment
Share on other sites

@Craig - I think you are completely correct. My plan is to delete everything I have started, and install a 2.3.0 version (blank profile), then import the data, and ensure that everything is looking right before trying to move up to the latest version. Thanks for your nudge...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...