Jump to content

Bootstrap other pw installation?


bernhard
 Share

Recommended Posts

Hi guys,

Is it possible to bootstrap a different pw installation on the same server? I tried including the other index.php file like stated in the docs but got an error:

Cannot redeclare ProcessWireBootConfig index.php line 160

I want to migrate some data from one installation to another. I know Adrian's migration module but would love to try it by hand as this could be very useful for another project I'm working on

Thanks!

Link to comment
Share on other sites

It would be neat to be able to instantiate another installation within current one and just gain access to its API, but that's not possible (yet). Multi-instance support is currently listed under ProcessWire 3.0 in the roadmap.

Currently your best bet would probably be using a migration tool or otherwise exporting the data first, and then importing it as a separate action, whether by using a migrator tool or case-by-case import/export scripts.

In some cases it also makes sense to create a wrapper script that bootstraps another installation and performs specific tasks on; you can then call this wrapper via exec(), shell_exec(), or any of the other program execution features of PHP. Said features are, of course, extremely dangerous if unsanitized params are passed through, but you probably already knew that :)

Link to comment
Share on other sites

Thank you teppo that helps :) I will try your suggestion of executing a separate script and come back when it worked.

Sanitization is no issue as it is a one time migration done by me, thanks for the hint nevertheless

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...