Jump to content
msummers

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...

Share this post


Link to post
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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

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

Put this in one of your templates,

<?php echo $config->version; ?>

  • Like 3

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I have inherited a ProcessWire site that was still in development

Cue lots of forums members checking their in-progress sites :)

But seriously - Welcome to the forums and PW.

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

@Bernhard - didn't see your post before I made my last one. Your suggestion makes a good deal of sense. I'll try that...

Share this post


Link to post
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 :)

Share this post


Link to post
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

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • 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.
       
      .htaccess.txt
    • 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
      Afternoon,
      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
      Pete
    • By bora
      Hello everyone,
      Last night as a "saturday night shitty weather stay at home" project I attempted to migrate a project that was on PW 2.7.x to PW 3.x 
      I use a lot of partials on the project so I have around 200 php files that needs to be namespaced. Compiler was giving me trouble with "Call undefined function" errors.
      Being the lazy developer I attempted to wrote a script after getting bored over pasting  the namespace Processwire; line into around 10 files.
      Below you can find the script, that is very basically adds <?php namespace Processwire;?> as the first line of every .php and .module file in the given directory and shows you the results. Of course it checks for namespace Processwire first
      By default it assumes ./site/templates folder but I tried it with a module which is giving errors due to namespaces and worked fine.
      Be careful and remember to take backups first
      https://gist.github.com/borantula/e41c4b6ba36f78b1110d400a16754691
×
×
  • Create New...