What I had to do was add a line to config.php. The issue was that the Board URL in the copy still points to the live site, so on load it automatically redirects to there, I think.
So in XF1 there used to be a config.php line for making a specific user a superadmin. Is that not possible anymore in XF2? Sorry its been a while since I had to do this obviously.
I've tried phpmyadmin changes but I can't seem to make my account an admin (I'm not on the live site, so I just need to test). This has taken a while to get to this point (literally, a year) and I never did get admin access to the original site
What I’m saying is that since you’re hosting the site on a new server, it will have a different IP address. You don’t need to make any changes at the server level specifically for testing the domain.
I’m assuming the XenForo files are already hosted on the new server and that you’ve updated the XenForo config.php file with the required database credentials.
Now, for testing, you only need to modify the Windows hosts file on the computer where you’ll be accessing XenForo. This lets you point the domain to the new server IP locally without changing the actual DNS records.
How to do this on Windows:
- Search for Notepad in the Start menu.
- Right-click Notepad and select Run as administrator.
- In Notepad, go to File → Open.
- Open:
C:\Windows\System32\drivers\etc\hosts
You may need to change the file type from
Text Documents (*.txt) to
All Files (.) to see the hosts file.
- Add the new server IP and domain at the bottom of the file. For example:
123.123.123.123 example.com
123.123.123.123
www.example.com
Replace 123.123.123.123 with the IP address of the new server and example.com with the actual domain.
- Save the file.
- Open Command Prompt and run:
ipconfig /flushdns
After that, when you open example.com on
that Windows computer, it should connect to the new server instead of the server currently configured in public DNS.
You can verify this by running:
ping example.com
or:
nslookup example.com
The important point is that the hosts file change affects only your local computer. The actual domain DNS remains unchanged, so normal visitors will continue reaching the existing/live server.
Once testing is complete, simply remove those entries from the hosts file and run ipconfig /flushdns again.