1-step Vanilla dev sites
Cross-posting this in case anyone here is interested: http://icrontic.com/discussion/97541/instant-localhost-sites-for-php-developers
To expand on the Vanilla symlinks part, for anyone who finds themselves doing lots of dev on many different sites:
I have a folder /www/_master that has 4 subfolders: applications, locales, plugins, themes. Each of those subfolders is full of symlinks to those bits and bobs from my various Vanilla-related repos. This is the "master" collection of symlinks.
Example:
[lincoln@yoshi /www/_master/locales:]# ls -la total 24 drwxr-xr-x 5 lincoln wheel 170 May 28 09:19 . drwxr-xr-x 6 lincoln wheel 204 May 27 21:55 .. lrwxr-xr-x 1 lincoln wheel 29 May 28 09:19 vf_de_DE -> /git/addons/locales/vf_de_DE/ lrwxr-xr-x 1 lincoln wheel 29 May 28 09:19 vf_es_ES -> /git/addons/locales/vf_es_ES/ lrwxr-xr-x 1 lincoln wheel 29 May 28 09:19 vf_fr_FR -> /git/addons/locales/vf_fr_FR/
I have a folder /www/_copy that contains symlinks to the 4 subfolders above, Vanilla's .htaccess, bootstrap.php, index.php, library folder, and js folder. It has normal folders named cache, config, and uploads (in fact, make this whole path of folders: cache/Smarty/compile). It has symlinks in the config folder for config-defaults.php and constants.php.
[lincoln@yoshi /www/_copy:]# ls -la total 72 drwxr-xr-x 14 lincoln wheel 476 May 27 22:14 . drwxr-xr-x 14 lincoln wheel 476 May 29 11:34 .. lrwxr-xr-x 1 lincoln wheel 22 May 27 22:14 .htaccess -> /git/vanilla/.htaccess lrwxr-xr-x 1 lincoln wheel 26 May 27 21:56 applications -> /www/_master/applications/ lrwxr-xr-x 1 lincoln wheel 26 May 25 23:35 bootstrap.php -> /git/vanilla/bootstrap.php drwxr-xr-x 3 lincoln wheel 102 May 25 23:37 cache drwxr-xr-x 5 lincoln wheel 170 May 27 21:40 conf lrwxr-xr-x 1 lincoln wheel 22 May 25 23:36 index.php -> /git/vanilla/index.php lrwxr-xr-x 1 lincoln wheel 15 May 25 23:36 js -> /git/vanilla/js lrwxr-xr-x 1 lincoln wheel 21 May 25 23:36 library -> /git/vanilla/library/ lrwxr-xr-x 1 lincoln wheel 21 May 27 22:02 locales -> /www/_master/locales/ lrwxr-xr-x 1 lincoln wheel 20 May 27 21:56 plugins -> /www/_master/plugins lrwxr-xr-x 1 lincoln wheel 19 May 27 21:56 themes -> /www/_master/themes drwxr-xr-x 2 lincoln wheel 68 May 25 23:36 uploads
NOTE: Symlinking index.php can cause path problems. So far, I haven't had any on nginx. That said... I haven't gotten very far using this yet so maybe I just haven't found it yet. If stuff is weird, manually copy index.php.
Now, anytime you copy /www/_copy to a new web root (like in the article I linked above) you'll have an always-updated copy of Vanilla in it forever.
Comments
This discussion brought to you by Lincoln reformatting his laptop and finally getting his shit together on his localhost
I've added 2 lines that will auto-setup a forum (if you supply the correct username & password etc in the last line):
Just a serious question and a bump also, of course : I see lots of symlinking, but I'm on Windows. Will these steps also work on Windows?
There was an error rendering this rich post.
@UnderDog I use a program called Link Shell Extension. You can find out all about it here: http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@Underdog You could try cygwin. Trying to port this script directly to Windows would be a bit of a challenge. Honestly, I can't imagine doing web dev on Windows now that I've seen the other side.
Gravy for the end:
I can't imagine doing anything creative or productive on Windows... once you go iOS.... well you know what ... I have come to a realization that people who like Windows are just masochists
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌