Jump to content

Migrating complete site


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

   32  class ProcessWire extends Wire {
   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


  • 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By theExo
      Hey folks,
      im pretty new to Processwire. A client of mine asked me to migrate his old (v2.5) Processwire Website. On his server its running on PHP 5.3 and i want to upgrade + migrate the site at the same time. I Downloaded the Site from his server to set it up locally, replaced the /wire directory, index.php and .htaccess with the files of the latest version. After that i changed the DB Connection details in the config.php, swapped to PHP 7.4 and now, when i open up the site on my localhost i get this error:
      compile(\ProcessWire\wire("config")->paths->root . "site/templates/includes/head.inc.php",array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true)))?> compile(\ProcessWire\wire("config")->paths->root . "site/templates/includes/header.inc.php",array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true)))?> compile(\ProcessWire\wire("config")->paths->root . "site/templates/includes/start_content.inc.php",array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true)))?> compile(\ProcessWire\wire("config")->paths->root . "site/templates/includes/footer.inc.php",array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true)))?> The page itself doesnt load, just a white space with this stuff on it
      I checked if the files exist, they do.
      I hope anyone can help me with that 🙂 Thanks in advance!
    • By dweeda
      How do I migrate a template with all its fields and values to a new site? Is their an export/import process?
    • By joeck
      Hi Guys,
      I'm trying to do my first migration to the customers existing server (IIS 10) . I ran the site as a subdirectory on my website for test purposes (everything works fine).
      Following the tutorial of Joss, I tryed the site on a local xampp server to make sure, it also works on a root directory. So far so good, everything works.
      Now I moved the files (from the xampp) to the customers server. The root/index page is shown but for every subpage i get 404 Errors...
      Hence I followed the troubleshooting guide for not working URLs:
      On the first sight, the .htaccess file is not recognized, therefore I contacted the host support. They said, it is recognized but not all modules are supported in the processwire .htaccess file. I did the "öalskjfdoal" test in the .htaccess file and didn't get a 500 Error.... BUT the rewrite rule from the hosts support, to proof the file is read, DID work... The support claims, they do not provide debugging... so basically the .htaccess file is recognized and working, but not throwing any errors (for whatever reason).
      Working rewrite rule (from support):
      RewriteEngine On RewriteBase / RewriteRule ^test\.asp$ index.html [NC,L] RewriteRule ^test\.html$ konzept.html [NC,L] RewriteRule ^test2\.html$ team.html [NC,L] The support said, a couple modules are not supported in the htaccess file, the supported ones are listed here: http://www.helicontech.com/ape/ (I think mod_rewrite is supported)
      As I do not completely understand what exactly is happening in the htaccess file, I'm stuck. I tried all suggestions I found regarding this topic on the forum, but none of them solved the problem.
    • By Maxplex
      Hey there, 
      i have a big Problem. I migrate Processwire with a Plugin from my local Mama Server to a 1&1 web server. After few Problems with Internal Error (.htaccess), the site looks greta and its work. But my Admin Panel are not working correctly. Before I installed the AdminThemeUIKit but now I can't install ist anymore and I can't refresh my modules. Nothing happens after a mouse click on it. If I am going to the pages, I can't see anything. There isn't a Site Tree or anything else. I can not change anything there. Please help me, it is a huge Problem for me... The admin looks like the very beginning of Processwire !!!

    • By Pete Jones
      I have a page setup with a repeater which has 40 or so items in. Each repeater item has around 6 fields.
      This is becoming a little unusable so I'd like to convert them to child pages of the current parent. Is there a way to do this (import/export maybe?)
      Many thanks
  • Create New...