Jump to content
John W.

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

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 Liam88
      Hi all,
      Quick question as I haven't found anything from my Googling. 
      I have a blog on the site which utilises pagination. On the standard blog page I have a custom header which has featured posts.
      Below that I then have recent posts like mosts blogs.
      Now if i click to page two or three I want the header to disappear and just show a continuation of the standard posts.
      I'm not sure how to go about this so any direction would be helpful.
      Thanks
    • By NorbertH
      As we are building some webapplications with the PW backend , having those really big spacings between all field elements in forms and everywhere is not too practical. 
      UI Kit already has less spacings between all elements than Bootstrap for example , but i am looking fore a more condensed BE Theme.  Maybe someone already made something like that?
    • 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 VeiJari
      Hello, our customer doesn't like the fact that they have to first add a title and then add the other info in the form. Therefore, we've enabled the way to skip this by making a temporary file before saving.
      But the problem is that by using module schedulepages in this piece of code in the module:  
      if (!$page->isNew() && $page->publishable() && $page->isChanged('status') && $page->is(Page::statusUnpublished) && $page->publish_from) {
                  $this->session->error($this->_("“Publish From Date” field was cleared to prevent the page from being unintentionally re-published on the next Lazy Cron run."));
                  $page->publish_from = null;
                  $page->save('publish_from');
              }
      it fires even with the temporary file and therefore after first save it resets the publish_from field. Is there a way to check if template is temporary, or something along those lines?
      One solution is just to ask the customer to first save the form after adding a title, but I don't see that as a good solution.
    • By Peter Knight
      Occasionally when I goto Modules > Upgrades I get the following type of error.
      There's actually about three of them and each one mentions a different line. In the example below, line 266 is
      $new = version_compare($versions[$name]['remote'], $versions[$name]['local']);  
      ( ! ) Notice: Undefined index: local in /Users/peterknight/Sites/mysite.com/site/assets/cache/FileCompiler/site/modules/ProcessWireUpgrade/ProcessWireUpgradeCheck.module on line 266 Call Stack # Time Memory Function Location 1 0.0011 405040 {main}( ) .../index.php:0 2 0.2602 5197688 ProcessWire\ProcessPageView->execute( ) .../index.php:55 3 0.2602 5198064 ProcessWire\ProcessPageView->__call( ) .../index.php:55 4 0.2602 5198064 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 5 0.2603 5198480 ProcessWire\ProcessPageView->_callMethod( ) .../WireHooks.php:733 6 0.2603 5198480 ProcessWire\ProcessPageView->___execute( ) .../Wire.php:383 7 0.3009 5463888 ProcessWire\Page->render( ) .../ProcessPageView.module:209 8 0.3009 5463944 ProcessWire\Page->__call( ) .../ProcessPageView.module:209 9 0.3009 5463944 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 10 0.3015 5465248 ProcessWire\PageRender->renderPage( ) .../WireHooks.php:834 11 0.3015 5465624 ProcessWire\PageRender->__call( ) .../WireHooks.php:834 12 0.3015 5465624 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 13 0.3016 5466040 ProcessWire\PageRender->_callMethod( ) .../WireHooks.php:733 14 0.3016 5466040 ProcessWire\PageRender->___renderPage( ) .../Wire.php:383 15 0.3032 5470760 ProcessWire\TemplateFile->render( ) .../PageRender.module:514 16 0.3032 5470816 ProcessWire\TemplateFile->__call( ) .../PageRender.module:514 17 0.3032 5470816 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 18 0.3033 5471848 ProcessWire\TemplateFile->_callMethod( ) .../WireHooks.php:733 19 0.3033 5471848 ProcessWire\TemplateFile->___render( ) .../Wire.php:380 20 0.3036 5493112 require( '/Users/peterknight/Sites/mysite.com/site/assets/cache/FileCompiler/site/templates/admin.php' ) .../TemplateFile.php:287 21 0.3038 5493616 require( '/Users/peterknight/Sites/mysite.com/wire/modules/AdminTheme/AdminThemeUikit/controller.php' ) .../admin.php:15 22 0.3038 5495120 require( '/Users/peterknight/Sites/mysite.com/wire/core/admin.php' ) .../controller.php:15 23 0.3085 5586144 ProcessWire\ProcessController->execute( ) .../admin.php:135 24 0.3085 5586200 ProcessWire\ProcessController->__call( ) .../admin.php:135 25 0.3085 5586200 ProcessWire\WireHooks->runHooks( ) .../Wire.php:442 26 0.3085 5586616 ProcessWire\ProcessController->_callMethod( ) .../WireHooks.php:733 27 0.3085 5586616 ProcessWire\ProcessController->___execute( ) .../Wire.php:380 28 0.3108 5596744 ProcessWireUpgrade->execute( ) .../ProcessController.php:333 29 1.2224 8773000 ProcessWireUpgradeCheck->getVersions( ) .../ProcessWireUpgrade.module:187 30 1.2227 8776256 ProcessWireUpgradeCheck->getModuleVersions( ) .../ProcessWireUpgradeCheck.module:185 I've been living with it for a while and while it doesn't seem to stop me upgrading etc, I'd love to fix it.
      Anyone recognise this type of error?
×
×
  • Create New...