Jump to content

Installing More than One Processwire


dees2012
 Share

Recommended Posts

Hi Everyone!

I am new to processwire and this CMS looks better than some of the others I have seen. I have a question though. I want to design Processwire websites for clients. I will be creating the sites on my computer using Xampp and then I want to upload the finished site to a live server.

What I'm confused about is should I install separate Processwire installations for each client and name them differently in Phpmyadmin.

For example I would install Processwire and name it Process-Client A. Then I will install Processwire again and name the database Process-Client B.

Would I be walking into a minefield if I did this?

Thanks! :)

Link to comment
Share on other sites

Hi, and welcome to ProcessWire! :)

To answer your question: yes, that's the way it's supposed to be done. Each website should have its very own installation of ProcessWire. I do believe there is a module that assists in using one installation for multiple sites, but this is only recommended for a single client that has multiple sites, not for multiple clients running on different servers.

I'm not sure what you mean by minefield, though. Could you elaborate that for me?

  • Like 1
Link to comment
Share on other sites

Apeisa made a module that allows you to run multiple sites with different domains run from single install
http://modules.processwire.com/modules/multisite/

But if you mean developing multi sites on Xamp then it simply is a matter of using a subfolder under c:/xampp/htdocs/ for each site with it's own processwire installation and database. Works for me on Wamp. When you upload a finished website you only have to check that Rewrite Base is configured correct for the hosting server.

  • Like 1
Link to comment
Share on other sites

Hi, and welcome to ProcessWire! :)

To answer your question: yes, that's the way it's supposed to be done. Each website should have its very own installation of ProcessWire. I do believe there is a module that assists in using one installation for multiple sites, but this is only recommended for a single client that has multiple sites, not for multiple clients running on different servers.

I'm not sure what you mean by minefield, though. Could you elaborate that for me?

Hi Mike!

Thank you for that answer! I really do need to have separate sites for separate clients. As far as 'minefield' I believe the term is to describe an area that is dangerous. I think during the Vietnam War there were mines placed in the ground so that they blew up whenever some unsuspecting person stepped on them. I realize processwire is not a bomb, but that was just an example for how I see a bad situation making a mistake in Processwire. :)

Apeisa made a module that allows you to run multiple sites with different domains run from single install

http://modules.processwire.com/modules/multisite/

But if you mean developing multi sites on Xamp then it simply is a matter of using a subfolder for each site with it's own processwire installation and database. Works for me on Wamp. When you upload a finished website you only have to check that Rewrite Base is configured correct for the hosting server.

Thanks for your input Pwired, but I need to create separate sites. In the future I may do a multisite so the information you gave me was helpful.

  • Like 2
Link to comment
Share on other sites

Hi Mike!

Thank you for that answer! I really do need to have separate sites for separate clients. As far as 'minefield' I believe the term is to describe an area that is dangerous. I think during the Vietnam War there were mines placed in the ground so that they blew up whenever some unsuspecting person stepped on them. I realize processwire is not a bomb, but that was just an example for how I see a bad situation making a mistake in Processwire. :)

You're welcome. I see what you mean then. But don't worry, it'll all work out just fine. Just gotta be in control of your various installations, much the same way you would when running on several production servers.

If you don't already, you may want to consider making use of Virtual Hosts in Apache. If you're not familiar with them yet, you can learn more about how to set them up here. The examples there are quite simple, but will do the trick. I prefer to use a combination of VirtualDocumentRoot and Acrylic DNS Proxy, so that I need not configure anything when I want to create a new site with a custom local domain, such as mysite.local. If you're interested to know how I go about it, let me know.

:)

Link to comment
Share on other sites

The example below is how it works and looks for seperate projects on my Wamp, I guess it wouldn't be much different from Xampp.

XAMPP is actually very different. It doesn't give you a UI to manage folders like that, which I prefer.


For reference, as it may help others, this is how I have set up my Apache:

1: Create a folder called 'home' in the root of any drive - I use my own partition for this, but you can host your sites wherever you like.

2: Create a VirtualHost in apache\conf\extra\httpd-vhosts.conf:

<VirtualHost *:80>
    UseCanonicalName Off
    ServerAlias *.local
    VirtualDocumentRoot "D:/home/%-2+/public_html"
    <Directory "D:/home/*/public_html">
        Require all granted
        AllowOverride All
        Options Indexes FollowSymLinks
    </Directory>
</VirtualHost>

Basically, this is like a wildcard Virtual Host, and matches example.local and example.com.local.

Note: You need to ensure that the module loads with Apache. This line in httpd.conf should be uncommented:

LoadModule vhost_alias_module modules/mod_vhost_alias.so

As mentioned, I have my own partition for my server files, but you can use whatever drive you like. I'd recommend, however, that you keep your home folder at the root of the drive.

Remember to restart Apache once you've done this.

4: Download and install Acrylic DNS Proxy and add the following line to its AcrylicHosts.txt file:

127.0.0.1 *.local

Remember to start the Acrylic service. Mine was automatically set to start with Windows, but did not start immediately after installation. If you're on Windows 7, there will be a new start menu entry that you can use to start the service. If on Windows 8, go to the start screen and type Acrylic, and you'll see the short-cut that you can use to start the service.

5: Create your new site by adding a new domain-folder in the home folder created in step 1. For example, create a folder called mysite.com. Then, in that new folder, create a public_html folder.

If all is successful, you'll see a directory listing when you visit mysite.com.local in your browser. You might notice that, when you request the domain for the first time, it does take a few seconds, but that's Acrylic doing its cache-magic.

Hope this helps, and is useful to someone. :)

  • Like 3
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

×
×
  • Create New...