holmescreek

Importing Older PW Database To New PW Version?

Recommended Posts

Question 1

I recently installed PW 3.0.62 for a new site and also have sites running older version of PW 3.x.

Can I export the database on an older version of PW 3.x and import it to PW 3.0.62 without any issues?

 

Question 2

(This is kind of alternative to the above for long term use - and maybe a better solution...)

On  the sites I've previously built I have templates (home, basic-page, contact) and fields that I commonly use, such as business_name, phone_1.  The last site I built is running PW 3.0.42.  I was considering cloning this into a local site and running the upgrade module to bring it up to PW 3.0.62. From there on out when I start I new project I could just run the PW upgrade module, copy the folder to the location for the new project and duplicate the database using the new projects name.

So basically, I'll always keep a "blank slate" site that I can just run the PW upgrade on, then duplicate into a new project. This would cut down on the work and time spent having to re-create these common fields, that I use. From there, I would just add fields, templates, etc, specific for the new website project.

Is this a sound approach to speed up development?

 

Share this post


Link to post
Share on other sites
1 hour ago, holmescreek said:

So basically, I'll always keep a "blank slate" site that I can just run the PW upgrade on, then duplicate into a new project. This would cut down on the work and time spent having to re-create these common fields, that I use. From there, I would just add fields, templates, etc, specific for the new website project.

Sure, it does work, however there are some shortcomings, some of them are (nothing serious, but still...):

  • $config->userAuthSalt will always stay the same
  • if working with a "new" server (new environment you have not yet tested PW with) it is best to run the installer first to see if all goes well...
  • you might want to pick a different database storage engine (innodb vs myisam) and a collation and the installer provides that

that is why it is best to export a site profile and install it afterwards instead of simply cloning the site:

Simple clones can be good for moving the site though, of course.

1 hour ago, holmescreek said:

Can I export the database on an older version of PW 3.x and import it to PW 3.0.62 without any issues?

It depends on the database storage engine (innodb vs myisam) and the collation used, I guess. I do not remember recent db related changes.

Edited by szabesz
typo
  • Like 2

Share this post


Link to post
Share on other sites

Thanks. I fresh installed 3.0.42 on my local system.  I then exported the database from a previous site running on 3.0.42.  Next, I imported the database, deleted templates/fields that I not re-occuring across projects, installed my modules, setup my custom ckeditor .js and .css files. Finally, I ran the ProcessWireUpgrade to upgrade the local site to 3.0.62. It all looks good.

From here out, I'll run ProcessWireUpgrade, then use the profile export module when setting up a new site.

Thanks for the help!

Btw, when I set up on a remote site, I always use the PW installer. After that I import JUST the db from my local install,  ftp upload the templates folder and lastly use the api to set a new password for the admin account for login. - never had an issue.

 

  • Like 1

Share this post


Link to post
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 FrancisChung
      Hi,
      I was wondering if people have any recommendation or share their experiences with websites that either provide free or commercial website templates?

      Thanks in advance!
    • By androbey
      Hello again! 

      Unfortunately I came across another problem. 

      I have a "regular" ProcessWire setup and want to create a separate php script. That script should be executed by a cron job and is bootstrapped with my PW setup. Main goal is to send mails which are stored in a email field. 
      My problem: I want to access a specific field from a template where only specific users have access to. Right now, the cron job is executed as "guest", of course. 

      How can I bypass this restriction, so that I have access to that specific field (it's only one email field)? 

      Does it make sense to set current user via api? 

      Hope you can help me out there.

      Cheers,
      Andreas
    • By flydev

       
      There you can download the module : https://modules.processwire.com/modules/duplicator/
       
       
      ---
      Introduction
      I was not aware of this module/topic and spend some time developing a module to backup, clone and move sites to a local folder or even GoogleDrive and Dropbox.
      The idea begun when I read about this Wordpress's plugin. I was planning to add features like s/FTP, Amazon Cloud, deployment installer and others great features from Wordpress Duplicator and release it for free to the community.
      Now that I see this @rot's module , I am wondering if it would be benefit to the community to have a second solution and so, if I should finish it.. ?
      ---
      Features / Wishlist :
      Save package to local folder :  implemented Save package to Amazon AWS : implemented Save package to Dropbox :  implemented Save package to GoogleDrive :  implemented Save package to FTP/FTPS :  implemented Manual backup with a standalone button :  implemented Backup from scheduled cron job :  implemented Exclude by file extension / filename / directory :  implemented File naming convention (Y-m-d_H-i-s-description.ext)   implemented Protect access to the module screen by role/user   implemented Installer / deployment functionality   implemented ---
      2017-02-07: Starting the CLOSED BETA TESTING.
      2017-11-28: Module release - version 0.0.44 at https://github.com/flydev-fr/Duplicator
       
       
      screenshots:


       
    • By mike62
      I'm trying to echo a field from another page, in my footer. I have a Website Settings page (id 1006) with several fields for general site settings, like store hours (field is named store_hours). In the footer, I have this:
      <?php $settingsPage = $pages->get(1006); echo $settingsPage->store_hours; ?> Shouldn't that output the contents of that field? Right now it's printing a "0" (zero) on the page.
      Elsewhere in the same footer template file, I have this code and it works fine:
      <?php $homepage = $pages->get(1); echo $homepage->body; ?> Does it have anything to do with the fact that the field is organized into one of these tabs, at the top of the page editor?
      (disclaimer: I'm new to PW, and have inherited this site from another developer; that's why I don't know how or why some of this stuff is set up the way it is).
      Thanks!

    • By jtborger
      Hi,
      Yesterday I found out about the relatively new markup regions functionality and I love it. The ease of use and simplicity is just what I think is typically ProcessWire and is why Im still happy I chose for PW four years ago when changing CMS/CMF. So thanks Ryan for your vision and all you put into it.
      That said, Im running into an issue I'm not sure what to think of it.
       
      I have enabled markup regions in config.php and it does what I suppose it should: it replaced and all. Very neatly. 
      The only thing I discovered is that while Im debugging some issues and I use var_dump to echo some stuff, it does that two times in a row. And this only happens when useMarkupRegions is enabled.
      I dont get this, does it mean the template file gets called twice (and thus the script is run twice?) or is it only displayed twice, where the first time most output is erased and /or replaced by the substituted output?
      I don't really get whats going on there. Is this behavior normal when using markup regions?
      Thanks!