Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

RSYNC-ing vanilla from xampp to host - Am I missing anything?

edited December 2012 in Vanilla 2.0 - 2.8

I would like to be able to make changes on xampp then rsync my changes to the actual host. So my xampp becomes my master copy and when I am comfortable with changes I simply rsync them to the host and the site is updated (and of course the database is unchanged on the host).

As far as I can tell I will need to exclude *.ini cache files from being copied from xampp to host, and make the config.php the same on both systems. Anything else I should NOT be copying to the host??

I have made it such that I have the same dbName, dbUser, dbPass on both xampp and the host. Then I diff-ed the two config.php files and have questions about the following config params:

$Configuration['Garden']['Cookie']['Salt'] =...
$Configuration['Garden']['InstallationID'] =...

I assume salt is part of the password generation/checking, so I'll simply copy the salt from the host to xampp and copy the admin passwd from the host-mysql_phpmyadmin to xampp-mysql_phpmyadmin in the appropriate table.

The installationID and installationSecret did not exist in my xampp install for unknown reasons. Can anyone shed any light on what these are used for? For now I've copied them to my xampp config and it seems to be working.


Best Answer


  • Options
    LincLinc Detroit Admin

    I really don't recommend doing that with the config. You are going to burn yourself, bad. Keep them separate.

  • Options
    edited December 2012


    Thanks for responding.

    Ultimately what I would like to do is ensure that anything I configure in the admin dashboard (with the exception of database changes) in xampp is propagated to the the host. Mainly this is for turning on/off plugins and applicatons (in fact, that may be the entire list I am concerned about). So for example if I turn on a plugin in xampp I know that after I rsync it will be turned on in the host. I want xampp to be the master as much as is possible.

    So is there another way that I can override the config file? So in this new methodology I would not rsync the config file (it would be excluded) and I would configure things manually (text edit instead of admin dashboard) in this override-file. I would do this first in xampp to override values in the config file to turn features on and off and test them. Then when I rsync, since the override-file is not excluded, the override values would be the same on the host and it would operate in the same way as the master development version (xampp).

    So in the new method it is a small contained list of overrides instead of impacting the entire config file.

    I'm not averse to editing the php that pulls in the config file if you can point that out and adding a require/include of overrides.php (I can deal with propagating that change to 2.1 when that happens).


  • Options
    LincLinc Detroit Admin

    If you turn on a plugin or application that makes database changes (many do) and then rsync that to your live site, your site will instantly crash with a fatal error.

    You cannot sync config files. You need to enable plugins and apps manually on your live site.

  • Options
    edited December 2012


    All right. I thought the config file showing the application as turned on would in effect install any database changes that would occur when you click install in the admin dashboard. So there is added code that only happens via the admin panel click that I would be missing with my method. Fine. (Bummer).

    As to my other question:

    Would this be a complete list of excludes:

    /conf/config.php /cache/*.ini /uploads/* /uploads/*.*

    Thanks again.

  • Options
    peregrineperegrine MVP
    edited December 2012

    probably ../compile as well. You probably would need to run /utility/update on upgrades too.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options



    I'm guessing you meant:

  • Options


    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    edited December 2012

    @Peregrine, Thanks

    @Lincoln, Any others?

  • Options
    edited December 2012


    Thanks very much.

    For others interested:

    ---- .bashrc edit begin ----------
    function syncForum {
    pushd /opt/lampp/htdocs/myXamppVanilla
    #make sure you update to correct -p<port#> below as well as the my* changes
    rsync -avzP --exclude-from "myforumsExcludeFile" --delete --rsh='ssh -p1234' .
    ---- .bashrc edit end ------------
    ---- myforumsExcludeFile begin -----
    #ensure there are no trailing spaces after each item
    #leading slash indicates a specific path within the rsync'd dir
    #no leading slash will match anywhere (in any dir)
    #fresh install to empty hostdir, comment out cache line (not *.ini line)
    #files and directories that you don't need/want on host
    ---- myforumsExcludeFile end -------

    Note that I use the --delete option which means (with the exception of the excluded files above) if the file/dir doesn't exist in xampp, it will be deleted from the host. So experiment first before doing this on a live site. Also note that this doesn't impact the mysql database so all of the discussions on your site will remain intact.

Sign In or Register to comment.