XF 2.0 Testing a site pre-live-transfer

Facula

Well-known member
Licensed customer
I am moving a site from one server to another. The destination site is my server, the origin is on a google server. This is not in my pay range so my web admin is helping, and has synched the servers (it has a wordpress front end).

The origin is still live, and he's been synching it on a regular basis to test it out (structurally) but now I need to "test" the XF side

The issue is the forum link is on the WP page, so when it links to the destination XF, that points to the live URL on the origin still.

How can I change this via cPanel or FTP so that the XF ACP points to the destination server so I can "see" the temporary destination site?
 
I am moving a site from one server to another. The destination site is my server, the origin is on a google server. This is not in my pay range so my web admin is helping, and has synched the servers (it has a wordpress front end).

The origin is still live, and he's been synching it on a regular basis to test it out (structurally) but now I need to "test" the XF side

The issue is the forum link is on the WP page, so when it links to the destination XF, that points to the live URL on the origin still.

How can I change this via cPanel or FTP so that the XF ACP points to the destination server so I can "see" the temporary destination site?
I think you can directly point the IP of your new website server and domain in hosts file of your system. This way you will be connecting to new server, no need to make any changes on any servers. Just make changes in the hosts file of the system in which you are testing.
 
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 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:
  1. Search for Notepad in the Start menu.
  2. Right-click Notepad and select Run as administrator.
  3. In Notepad, go to File → Open.
  4. 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.
  1. 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.
  1. Save the file.
  2. 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.
 
Actually, I figured this out. My config.php worked even though my web admin told me to just go direct to the URL. I hadn't tried that (I suppose I could change that config file entry and see if it worked but it doesn't matter)

Then I just added myself to the xf_admin and a few other table and in xf_user changed is_admin to 1, that did it.

Now to disable email and verify it all works
 
Back
Top Bottom