Jump to content

Change name of the 'site' folder?


modifiedcontent
 Share

Recommended Posts

Is it possible to change the name of the default 'site' folder? Like change it to 'mywebsitename'?

There is no real technical reason for me to want to do this. I am just afraid that the inconspicuous 'site' will get lost on the server, that I or someone else will end up deleting at some point.

Link to comment
Share on other sites

While you can do this it's not recommended, as some parts of ProcessWire depend on this name, e.g. some rewrite rules in the .htaccess. Also I don't see why you would rename your /site folder to your website's name, as really the whole folder, which holds /site, /wire, index.php and .htaccess, is your website. If someone is likely to delete a "site" folder, than it's also likely that this person could delete the "wire" folder, both are not desirable results. 

Link to comment
Share on other sites

https://processwire.com/talk/topic/7615-renaming-the-default-site-directory/

Be sure to read through the whole thread, because you need to take/make extra precautions in an additional .htaccess file.

The index.config.php should be created at the root level. See index.php https://github.com/ryancramerdesign/ProcessWire/blob/dev/index.php#L74 where this comes from.

But to be honest the reason you mention seems pretty weak for doing stuff like this, especially if you are maybe not entirely sure what you are doing.

Link to comment
Share on other sites

OK, thanks for the responses. I saw that thread with the index.config.php, but wasn't sure if that really answered my question, if there wasn't a simpler way to do it.

Still trying to understand how ProcessWire works. I thought you could have different sites on one ProcessWire installation; so one 'wire' folder and then different 'sites'.

I have a ProcessWire site at the root of a VPS full of Wordpress sites on sub-domains, all with 'mywebsite' folder names. That is where my confusion came from.

Link to comment
Share on other sites

I thought you could have different sites on one ProcessWire installation; so one 'wire' folder and then different 'sites'.

One can do this, but it requires some manual setup and maintenance. As long as there's not a major reason to go that way it's just easier to go with independent installations.

Link to comment
Share on other sites

I thought you could have different sites on one ProcessWire installation; so one 'wire' folder and then different 'sites'.

One can do this, but it requires some manual setup and maintenance. As long as there's not a major reason to go that way it's just easier to go with independent installations.

Actually, it's pretty simple, this is how I have my server set up and it allows me to upgrade all sites in one go.

Just point all your domains to the same ip and directory and place the index.config.php in the root (it's originally inside wire) and place a line like this 'mydomain.com' => 'site-mydomain' for each site. See the complete instructions in the file https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/index.config.php#L39

  • Like 1
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...