Jump to content

How to package a site to install it on another machine?


demhan
 Share

Recommended Posts

Hi Folks - I've just started using processwire to help a friend build her website (a magazine), and so far I like it much better than drupal. Thanks for your great work! I have a question: how do I package my current implementation so I can share it with my friend (we're both developing on our local machines). Something like the blog-profile. I assumed I simply had to copy over install/templates/modules to site-default but that didn't work.

Thank you!

Nawaaz

Link to comment
Share on other sites

The profile exporter will create an SQL file and package up all your files.

You can then run an install with a fresh copy of PW with your archived files - full instructions are with the module and it walks you through it.

Otherwise, you can easily just move the entire PW directory over to a server, export your own SQL, and then just change the database settings in config.

One note, whichever you do, if you are adding images via TinyMCE, it saves the path to the image folder. If you are developing in a subdirectory, that will be part of the path.

You can do a search/replace within the database to change this later, but what can be easier is to make sure the development set up is the same as the final production site. (Especially if two of you are working on the same thing!)

  • Like 2
Link to comment
Share on other sites

Otherwise, you can easily just move the entire PW directory over to a server, export your own SQL, and then just change the database settings in config.

This is what I usually do. A few things I've occasionally had to take into account when doing this, in addition to the image path you mentioned:

  • The installer never gets to run, so doesn't have the chance to confirm compatibility with the server. If it's a new server you haven't used before, you might try just installing a test copy of PW to see if the installer mentions any issues. I usually do that if something doesn't work after copying the site over.
  • You need to make sure that permissions are retained for /site/assets/. Sometimes I have to reset the permissions after copying to the server so that everything is still writable. 
  • If using a cache, you might want to clear it before or after copying to the server: rm -r /site/assets/cache/* 

Most of the time, I don't have to do any of these. But it's good to know about them for when you do.

Link to comment
Share on other sites

Thanks Folks! I was trying to use the Site Profile Exporter when I noticed

a) that pw is not able to find it as a new module

b) It seems to be already there in the Process section of modules, but is in a dark red, and there is no install button, but instead when I click on it says submit.

c) there is no setup > export profile link.

I'm missing something here.

Link to comment
Share on other sites

You need to download it and install it from the modules section of the site.

http://modules.processwire.com/modules/process-export-profile/

What I suggest, however, is download and install the Modules Manager. Then you will be able to install modules direct from that manager, including the profile exporter.

http://modules.processwire.com/modules/modules-manager/

Link to comment
Share on other sites

Thanks Joss! I did install modules manager and that worked. Used it to download and install profile exporter (it said that installation is successful) which is showing up now in the modules pages (in a dark red, I don't know if that is a sign of something). But I do not see a export profile link in the setup page. So it's as though the install didn't do anything.

Link to comment
Share on other sites

Using the standard admin theme?

Check in the modules directory, see if it is there?

Go to setup > Module manager and refresh and see if it does anything?

Not a problem I have had, unfortunately, so I am not being much help.

Link to comment
Share on other sites

Unable to install module 'ProcessExportProfile': Duplicate entry 'export-site-profile-22' for key 'name_parent_id'

It sounds like you've got a page that needs to be deleted. In your page list, go to:

Pages > Admin > Setup > export-site-profile 

…and delete it. 

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