holmescreek

Importing Older PW Database To New PW Version?

4 posts in this topic

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
2 people like this

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.

 

1 person likes this

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 rocket
      Noob to Processwire. Trying to convert some older sites to Pwire. I am having trouble including a legacy form class into my templates:
      If I embed the php directly in the template, it works. But if I use include statements, the form object returns null.
      This works:
          use formbuild\Form;
          session_start();
          $form = new Form(init1, 'init2', ...');
          $form->param1 = ...;
          $form->param2 = ...;
          $form->param3 = ...;
       
          $form->render();
      -----------------------------------------------------------------------------------------
      This fails:
          include_once ($config->paths->templates."forms/form1.php");
          $form->render();
      ____________________________________________________________________
      My referencing is OK, no error message. The only code that cannot reside in the include file are the following lines:
          use formbuild\Form;
          $form = new Form(init1, 'init2', ...');
      My PhP is rusty, maybe that is the problem, but it could be something about Pwire, namespace maybe. I have tested it outside Pwire and no problems.
      Please advise. Thanks.
       
       
    • By Sipho
      Is there a module or plugin that is like a repeater but you can choose a template? I want something that let's me:
      choose a template to get fields from, display these fields like a repeater does add new pages without adding a title or name (this might be achievable using other means like ProcessSetupPageName)  delete pages I feel like somebody might have already made a module that does just this, however, I haven't found any. Perhaps there is a way of doing this with a standard repeater that I don't know about.
    • By Sipho
       

      I have an issue where I want different formats for creating one page. When you are creating a new page I want it to offer different types of fields from when you are editing it.
      For example, I have a field called countries which is a multiple page reference field. This is desirable as it is in a very easy to edit format. Currently, I am using selectize.js which makes it possible to search for the pages and add them in a tag fashion. This is how I want it to be when a page is already created. However, when creating a new page it is often easier to just paste a list of all the countries as text. This is because the data is coming from an old website where the countries are written like this:
      I can code something which converts this text into the multiple page reference fields but I am not sure how to go about it. At first I tried making another template which had fields that were in this “quick” format. Then I planned to make it such that when you add one of these quick pages it creates a page in the standard format and deletes itself. This has it’s own problems such as where to place the new page, what title and name to give it, whether to have just one quick page or multiple and when to delete it. It just didn’t seem right. 
      Another possibility would be to show special quick fields when creating a new standard page but hide them when the page is saved and show the standard fields. I am not to sure how to achieve this though. 
      Does anyone know a better way of going about this? I feel like this is a simple problem which already has an elegant solution.
       
    • By franciccio-ITALIANO
      Hi, 

      In one Page I would like to put a lot of url.
      There is url's field.
      Now, I add url's field to one template, but I don't know to add 2 or 3 or 10 url's field in that same template... the problem is simple, but processwire don't allow it...

    • By didhavn
      Hey everbody.

      I wanted to share something I have been working for quite some time, in total currently three premium Templates or Site-Profiles for ProcessWire 3 including a onepage template, a blog template and a blog+sidebar template.
       
      Here are some Quick Facts:
      Fully responsive Multilanguage support Full SEO support Optional Google Analytics Easily create new pages out of multiple predefined sections Lazyload the sections of a page [Group and update website-information into blogs] (blog, blog+sidebar) [Use tags to tag and group blog entries] (blog, blog+sidebar) [User-comments] (blog, blog+sidebar) [Create each page with or without sidebar] (blog+sidebar) Website-wide search by text or tags Password protect each page individually with sophisticated page-encryption with dummy texts and pixelated images
      Just go to https://pwtemplates.de to test the demos (e.g. blog-sidebar) and purchase them for a small expense allowance.
       

      Hope you like it!