Support » Installing WordPress » Moving to new domain wp-config issue

  • Resolved caleb1

    (@caleb1)


    I am moving my wordpress site to a new domain. I followed this step by step guide:

    https://blogvault.net/moving-wordpress-site-to-another-domain/

    It all went smoothly up to step 6.2. where I replace the info in the following lines of code in the wp-config:

    
    define(‘WP_SITEURL’, ‘https://www.example.com’);
    define(‘WP_HOME’, ‘https://www.example.com’);

    but my wp-config file did not have those lines of code in it.
    I added the lines with my new domain in right above the “That’s all, stop editing! Happy publishing.” comment. The only issue was I could not insert the URL with the “http://” because it saw the “//” as a comment and commented out everything after it. So I just did the following:

    define(‘WP_SITEURL’, ‘example.com’);
    define(‘WP_HOME’, ‘example.com’);

    It did not seem to work because when i go to the url of the new site it redirects back to the URL of the old site. If I go to my new URL/wp-admin I get the following error:
    https://i.imgur.com/dY92oNH.jpg

    Not sure if it is a database issue as I updated the database, database username, and database password in the wp-config and double checked that it was correct. I would guess it has to do with the issue with the siteurl and home definitions in the wp-config.

    Any ideas what I can do to fix this considering I did not have those two lines of code in the wp-config file to begin with? Or how I can type a “http://” in there without it commenting out everything after it?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter caleb1

    (@caleb1)

    I have solved the issue
    I had forgotten to add the user to the database in cpanel (tutorial seemed to leave that out) that allowed me to get to the wp-admin on the new domain but the new domain home page still redirected to the old one.
    Then that was fixed because something might have been wrong with the formatting of the text when I copied it from the tutorial to the wp-config file, as I copied those lines of code from somewhere else and added it and it worked fine (without commenting it out when I added the //)

    jay sharma

    (@jaysharma12)

    It did not seem to work

    Thread Starter caleb1

    (@caleb1)

    @jaysharma12 what error are you getting and what have you tried?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.