Jump to content
demhan

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

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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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/

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Yes standard admin theme, and yes its there in the modules directory.

When i try to uninstall it (so I can try again) I get the message

Duplicate entry 'export-site-profile-22' for key 'name_parent_id'

Share this post


Link to post
Share on other sites

ummm

Try uninstalling the module

Forget that - I just read your post properly

Share this post


Link to post
Share on other sites

Delete it manually from the modules table in mysql and try again install.

Share this post


Link to post
Share on other sites

I did what Soma suggested -- deleted it from modules table. When I go to install it I get

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

Share this post


Link to post
Share on other sites

Maybe theres another one in there. Or try delete cache in aessets folder.

Share this post


Link to post
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. 

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.

×
×
  • Create New...