• I have a live https://www.site.com/wordpress
    I just got a new server/site and the host gave me and address of
    https://www.temp.site.com to upload my wordpress too.
    Once wordpress is loaded and working correctly, they will remove the “temp” and make it site.com.
    *****
    ***** MY PROBLEM IS *****
    I moved my wordpress to the new domain, and when I try to log in at https://www.temp.site.com/wp-admin it takes me back to my old domain of https://www.site.com.
    *****
    ***** MY QUESTION *****
    How can I access my wordpress on my new server at temp.site.com now?
    I need to make/change the site URL in the “new” wordrpess to read: https://www.temp.site.com
    ******
    ******
    I have a local folder that I can re-upload thru FTP if given the information on how to edit the correct files.

    • This topic was modified 7 years, 7 months ago by spanky22.
Viewing 1 replies (of 1 total)
  • When you try to login, WordPress uses values for siteurl and homeurl that are set in the database. That’s why you’re being redirected.

    So, for development purposes, open your wp-config.php file on the temp site and add the following lines:

    define('WP_HOME','https://example.com');
    define('WP_SITEURL','https://example.com');

    Make sure to update URLs with the correct ones for your temp site. This will force WordPress to use them, instead of the ones in the database. This will NOT change database values. Deleting those 2 lines will go back to what’s in the database.

    If you’re changing site url from https://www.site.com/wordpress to https://www.site.com/, you will need to update this in your database. Ideally, in production, you don’t want to use those 2 constants I mentioned above. So you’ll need to update your database.

    I would recommend checking out this plugin when you’re ready to take your website live with the new domain: https://en-ca.www.ads-software.com/plugins/velvet-blues-update-urls/

    ^V

Viewing 1 replies (of 1 total)
  • The topic ‘Site Domain – How to edit?’ is closed to new replies.