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.

Reload config.php on shared hosting?

I have setup a new Vanilla 2.1 installation and am using the Bootstrap theme. Its working great and I am close to launching my forum, but I want to have users accessing the site from mobile phones receive the bootstrap theme by default, rather then the mobile theme and then having to use the "see desktop site" option.

Based on some searching of the forums, I have modified my config.php to include the following line:

$Configuration['Garden']['MobileTheme'] = 'Bootstrap';

However, this has not made any difference which makes me think I need to "reload" the config.php file. If I was working on localhost or a dedicated server I could just restart Apache, but since I am on shared hosting, there is no way to do this (AFAIK).

Is there any way to reload / re-read the config.php from the Dashboard?



  • Options
    peregrineperegrine MVP
    edited October 2014

    try changing regular theme to default save and then change back to bootstrap and save via dashboard.

    try deleting the .ini files in your cache, or

    deleting the php files in cache/Smarty/compile

    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
    BleistivtBleistivt Moderator
    edited October 2014

    The config is read in every pageload.

    The only thing that can interfere with this is if you have APC enabled, which it will opcache the config.php

    Before you take any steps though, check if changing other config values has any effect.

  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP


    I don't think you should need to do that.

    You probably saw this thread, where it worked for others:

    I just tried this on my localhost, and it worked straight away.

    I enabled the Bootstrap theme, added the following line in config.php

    $Configuration['Garden']['MobileTheme'] = 'Bootstrap';

    and the mobile theme changed from default to Bootstrap.

    Is there anything unusual about your setup?

  • Options

    I think, he needs to see if enabling plugins or changing themes works and report back as Bleistivt says, the config.php could be cached.

    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

    Thank you everyone for your help! The problem was that I needed to type the theme name as 'bootstrap' instead of 'Bootstrap'.

    Earlier the entry in config.php for the "non-mobile" theme was:

    $Configuration['Garden']['Theme'] = 'Bootstrap';

    which I had copied for the MobileTheme option, but after disabling and renabling the Bootstrap theme as @peregrine‌ suggested, I noticed the entry changed to 'bootstrap'.

    In any case it is working now! @Bleistivt‌ Thanks for the clarification about the file being re-read every time a page loads. I was afraid I would have to step up for dedicated or VPS hosting which is significantly more expensive!

Sign In or Register to comment.