MyBB Community Forums

Full Version: Sub-Domain to Domain
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello

I am currently working on my site which is hosted on a subdomain. When I am done, I am planning to get a domain. What files would I need to modify so that the site is functional without me having to rebuild it.
As a FYI, in addition to MyBB 1.8, I also use the XRoster (mod for MyBB)

Thank you for the help
Just inc/settings.php to change the urls and cookies, and you also have to modify values in your mybb_settings table in database.
Thank you for the answer. How would I modify the values in mybb_settings table? I am not much proficient with SQL. Would the edit be done in an html file?
^ after changing the required settings in ~/inc/settings.php file you can log into forum admin panel & put correct settings there

admin panel >> configuration >> settings >> site details
So to get this straight for my site I'd go to settings.php and do a replace all "http://staking101.com" with "http://staking101.com/forum" and save the php file.

Then I need to go to admin CP and edit board url in site details?

I don't need to mess with the SQL database then?

Thanks in advance
That seems to me what was posted
So, I do have a problem with this right now.

I did all the changes and I can login, however when I change pages, it asks me to login again and it won't refresh.
Any help on this would be great

Thank you for the help
Please post the board's new URL and I'll try to verify if its cookie settings are correct to help you out. It's most likely a cookie issue.
w-gaming.org

never mind. Fixed it Smile
you were right. Stupid settings....

Hmm, I thought I had it fixed, but for some reason, today it is not working again.
Now I get "Invalid administration session"

Any ideas?
Alright, thanks for that. I see the problem after looking in Firefox's Dev Tools.

var cookieDomain = ".";
var cookiePath = "/";
This shows that the cookie domain setting is in fact incorrect.

Here's how to fix it.

Open inc/settings.php, Ctrl-F for "cookiedomain", and replace the "." that's currently there to ".w-gaming.org"

Then, go to your Admin CP. You should be able to log in and change settings for a short time. Go to the configuration tab and use the search field to search for "cookie" and set "cookie domain" to the same thing there as you did in settings.php


How this works: MyBB caches settings periodically in settings.php. The cached things are checked before the database is queried for settings. Changing the file will give you time to effectively have fixed it just long enough to be able to change it in the ACP, which changes it in the database AND settings.php.

Let me know how this goes.
Pages: 1 2