mrkhan Posted January 18, 2015 Share Posted January 18, 2015 Hello I am wondering is this possible to rename the main "wire" directory to some other name ? if yes, can i have some help. Thanks Link to comment Share on other sites More sharing options...
Joss Posted January 18, 2015 Share Posted January 18, 2015 Why would you want to rename it? 3 Link to comment Share on other sites More sharing options...
mrkhan Posted January 18, 2015 Author Share Posted January 18, 2015 Hello Joss, Actually i am leaning PW and i really love it, its really vary nice CMS and great options and i love the way how it handle every thing as page and how it create tables etc. i want to see all what can i do with this and till what extent i can customize. like in WP, we can rename any folder we want for security and other things, thats why i want to know can we rename PW folder to some other name or not ? Thanks Link to comment Share on other sites More sharing options...
Joss Posted January 18, 2015 Share Posted January 18, 2015 From the security point of view, there is no need to rename the wire folder at all. Unlike Joomla, which has a defined administration directory, there is no admin directory for your site, so the same considerations do not apply. In fact, there is no need to touch it. It is simply the engine that drives the system - keep the lid shut and ignore it. With ProcessWire, the site directory is your entire world and is yours to mess around with as you like. For 99% of the time, you will want to leave the directory structure as it is. Modules in modules, assets in assets and so on. The templates folder is your fun bit. Just think of it as the root of your static website. This is nothing like wordpress - you have no crazy messing with themes and child themes and strange constructions that MUST work in a certain way. Just use the directory in the way you like to build your sites. 2 Link to comment Share on other sites More sharing options...
mrkhan Posted January 18, 2015 Author Share Posted January 18, 2015 Hello Joss, i know all this and as i said earlier thats why i love PW, but m question is still same, is there way to rename the "Wire" directory or not? i don't want to change just for my information and trying that's it. Thanks 1 Link to comment Share on other sites More sharing options...
Nico Knoll Posted January 18, 2015 Share Posted January 18, 2015 I guess you can. But you would have to go through every file which contains a path to /wire/ and replace it, too. Link to comment Share on other sites More sharing options...
interrobang Posted January 18, 2015 Share Posted January 18, 2015 In ProcessWires index.php you can configure the name of the wire folder: $wireDir = 'wire'; https://github.com/ryancramerdesign/ProcessWire/blob/master/index.php#L77 I doubt Ryan is actively supporting and testing this, but might be worth a try. If you rename your wire-folder you will probably have to adjust some lines in your htaccess too. 3 Link to comment Share on other sites More sharing options...
teppo Posted January 18, 2015 Share Posted January 18, 2015 I doubt Ryan is actively supporting and testing this, but might be worth a try. If you rename your wire-folder you will probably have to adjust some lines in your htaccess too. Not going to argue that you shouldn't try renaming the wire directory (you shouldn't), so I'll just jump in to mention that what @interrobang pointed out above is very, very important. The .htaccess file, among other things, protects ProcessWire's core system. If you do end up renaming the wire directory, make sure that you also make changes to any protective rules in that particular file (and potentially elsewhere too). The important thing here is to understand that by making changes to something like the wire directory location, without fully understanding what it means and how it might affect other things, you could easily be causing new security issues where there were originally none. Just saying. "You've been warned", and so on 2 Link to comment Share on other sites More sharing options...
mrkhan Posted January 18, 2015 Author Share Posted January 18, 2015 Thanks every one for replying so quickly, this is Fantastic and thanks to teppo for warning this is getting more interested. i want to know is there a way to have one "wire" directory and run multiple websites ? like one "wire" directory on some main server and only "site" directory in website "public_html" is this possible ? Thanks 1 Link to comment Share on other sites More sharing options...
diogo Posted January 18, 2015 Share Posted January 18, 2015 https://processwire.com/api/modules/multi-site-support/ I use option 1 from here on my production server, works perfectly. Just be aware that all websites that you create using this system will be tied to the same version of PW, so upgrading for one will upgrade for all. I never had any problem with this myself. 3 Link to comment Share on other sites More sharing options...
mrkhan Posted January 19, 2015 Author Share Posted January 19, 2015 Hello diogo, thanks for your reply and link, i read that page many times but really can't understand, like rename the directory to site-something why as all domains will have its own PUBLIC_HTML directory. let me explain you here little bit more. what i am looking for is websites with different databases but using same wire directory. like i have four domains 1. abc1.com 2. abc2.com 3. abc3.com 4. abc3.com so i want to put wire folder in abc1.com PUBLIC_HTML folder and put SITE folder in PUBLIC_HTML of all three other domains, now what configuration i need on abc2.com and abc3.com etc to access wire folder from abc1.com assuming all 4 domains are on one server. Thanks Link to comment Share on other sites More sharing options...
Soma Posted January 19, 2015 Share Posted January 19, 2015 One way is just symlink the wire directory into your websites directory. Link to comment Share on other sites More sharing options...
mrkhan Posted January 20, 2015 Author Share Posted January 20, 2015 hello Soma, i really don't understand how to do that, i am trying this from 2 days but no success i have one main domain where i want to place wire directory so that every time i just update one directory and all websites are updated. for example, my main domain is 1. abc1.com in this domain i have wire directory. now i have three other domains using wire CMS etc 1. abc2.com 2. abc3.net 3. xyz1.org now what i have site directory in these domains public_html folder. now which file i place in which domain public_html and what path i should set. also can these domains be on same server or it can be on different servers? Thanks Link to comment Share on other sites More sharing options...
Soma Posted January 20, 2015 Share Posted January 20, 2015 You'd link to the wire directory from wherever folder on your server. This doesn't work cross server. It's like an like a shortcut linking to a folder. So you create a symlink inside each domain where the wire folder would be, and the link points to the real wire folder. There's tons of infos on the internet just search http://en.wikipedia.org/wiki/Symbolic_link Link to comment Share on other sites More sharing options...
mrkhan Posted January 24, 2015 Author Share Posted January 24, 2015 Hello Soma, thanks for reply but after 1 week of struggling and searching doing all i can but i am unable to run multi site. i have sites on local host and web server, i want to test it first on localhost then web server. what i can't understand is in index.config.php this is line to change 'mydomain.com' => 'site-mydomain', how i like localhost in index.config.php to mydomain.com as its local host not .com ? and in web server how i put my domain directory to "site-mydomain" some thing starting with site ? let me explain you what i did 1. i have running PW website in localhost directory "PW" 2. i copy its DB with phpmyadmin to new DB name "web1" 3. i create a new directory in localhost name "web1" 4. i copy all "site" ".gitignore" ".htaccess" , "index.php" to web1 4. i configure "site/config.php" to new web1 DB 5. copy "index.config.php" to web1 root folder 6. now change " 'mydomain.com' => 'site-mydomain'," to "'http://localhost/web1/' => 'web1'," can you please help me how can i do this ? Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 24, 2015 Share Posted January 24, 2015 You should at least take care about the comments directly above these lines in the file: * Some Examples (you should remove/replace them if used). * Just note that the values must begin with 'site-'. Also you should try not to suddenly add http:// in front of the domain and a subfolder, as they are not a part of a domain. So this does not work without real domains (which you can set up locally, too). Processwire does compare the $_SERVER['HTTP_HOST'] with the keys of your array, to get the corresponding site directory. Link to comment Share on other sites More sharing options...
mrkhan Posted January 24, 2015 Author Share Posted January 24, 2015 Hello LostKobrakai, its still not working. as write above let me explain again i have localhost and i have one website running on http://localhost/pw now i create one more directory in XAMP name web1 and my website path is: http://localhost/web1 i have copied SITE directory to web1 and rename to site-web1 and put and copy index.config.php in root folder of web1 and these are lines in my index.config.php 'localhost/web1/' => 'site-web1', 'www.mydomain.com' => 'site-mydomain', 'dev.mydomain.com' => 'site-dev', 'www.otherdomain.com' => 'site-other', Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 24, 2015 Share Posted January 24, 2015 To make myself mor clear. "localhost/web1/" is not a domain, it's a full path. The domain would be only the "localhost" part. This would work if you setup "localhost" and "dev.localhost" or any other domain, but you can't use subfolders in the array. Also both domains have to point to the same processwire installation with the difference of two different site folders. This should look like this: htdocs ⌊ site-web1 ⌊ site-web2 ⌊ wire Link to comment Share on other sites More sharing options...
mrkhan Posted January 24, 2015 Author Share Posted January 24, 2015 Hello LostKobrakai, my folder structure is like this htdocs ⌊ site-web1 ⌊ site-web2 ⌊ wp ⌊ wire what will be my in my index.config.php Thanks Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 24, 2015 Share Posted January 24, 2015 @mrkhan: You should have the structure as LostKobrakai showed us. Link to comment Share on other sites More sharing options...
mrkhan Posted January 24, 2015 Author Share Posted January 24, 2015 why can't we have as i write ? and how we will have wire folder on web server ? Link to comment Share on other sites More sharing options...
Martijn Geerts Posted January 24, 2015 Share Posted January 24, 2015 Maybe you can with a lot of work. (not out of the box). Better to go with the flow then row against it. 1 Link to comment Share on other sites More sharing options...
mrkhan Posted January 24, 2015 Author Share Posted January 24, 2015 Hello Martijn Geerts, ok if my folder structure is like this htdocs ⌊ site-web1⌊ site-web2⌊ wire what will be my in my index.config.php to load http://localhost/web1 http://localhost/web2 Thanks Link to comment Share on other sites More sharing options...
diogo Posted January 24, 2015 Share Posted January 24, 2015 Seriosuly? See here: To make myself mor clear. "localhost/web1/" is not a domain, it's a full path. The domain would be only the "localhost" part. This would work if you setup "localhost" and "dev.localhost" or any other domain, but you can't use subfolders in the array. Google "apache localhost subdomains" to know how to do this. Link to comment Share on other sites More sharing options...
mrkhan Posted January 25, 2015 Author Share Posted January 25, 2015 i am sorry but i can't figure out how to fix that in localhost, now i have uploaded there websites on web server now my domains are as under 1. domain1.com ⌊ site-domain1 ⌊ wire and physical path is : /home/web1/public_html/site-domain1/ & /home/web1/public_html/wire/ 2. domain2.com ⌊ site-domain2 and physical path is : /home/web2/public_html/site-domain2/ 3. domain3.com ⌊ site-domain3 and physical path is : /home/web3/public_html/site-domain3/ all the 3 domains are on one server, can you please guide me how to make these sites running, i mean entry in index.config.php it might be vary simple & i am trying all my best but i can't figure out how to get it working. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now