WordPress.org

Ready to get started?Download WordPress

Forums

Changing Domain Name Failure (8 posts)

  1. GERADOMI
    Member
    Posted 1 year ago #

    Can someone help, please?

    I've just messed up my site which I've had "under construction" for a few months, but not yet launched. I thought I followed instructions from WP Forum and YouTube tutorials correctly for changing my domain name as follows:

    I did a database backup of my blog. Then logged into CPanel, then into phpMySQL. Went to my active child theme: twentytwelve. Only one file there: style.css. I added a new file: functions.php. Edited this empty file by typing in the following three lines (nothing else):
    /*Changing domain names in hard-wired fashion*/ update_option('siteurl','http://smartgridix.com');
    update_option('home','http://smartgridix.com');

    (Sudden thought: should I have enclosed those lines between
    <?php

    php>

    At first, I commented out all of the three lines -- then I got brave, and changed to commenting out only the first text line describing the action (as above), presumably making active the two lines of 'update_option' commands. I saved this active file (as I had saved previously the fully commented inactive three lines).

    I went to Dashboard>Settings>General and changed my home and site URLs to smartgridix.com. I saved these changes.

    I then typed in the new URL, "smartgridix.com/wp-admin" to Mozilla browser and the following error message came up:

    /* Changing domain names in hard-wired fashion update_option('siteurl','http://smartgridix.com'); update_option('home','http://smartgridix.com');*/
    Warning: Cannot modify header information - headers already sent by (output started at /home/dompeter/public_html/wp-content/themes/MyTwentyTwelveChild/functions.php:9) in /home/dompeter/public_html/wp-includes/pluggable.php on line 876

    Panicking (this happens easily when making coding changes, at least to me), I uploaded/restored my saved database files using my C-Panel, but still get the same error message above.

    I'd really appreciate a helping hand, as I am now stuck and cannot access my web site. I spent two days reading and watching how-to YouTube videos on how to do this domain name change, and I still screwed up!

    My only other option is to recreate the web-site/blog from scratch with a fresh copy of WP and with the new URLs but it seems to me that that should not be necessary.....

    Many thanks and sorry for longish message.

  2. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    At smartgridix.com/wp-admin I get a holding page like the domain name is not yet setup.

    http://codex.wordpress.org/Changing_The_Site_URL

  3. GERADOMI
    Member
    Posted 1 year ago #

    Thank you. Also, the codex file you sent is helpful re the section on hard-wiring the new domain names: "Edit wp-config.php".

    I am going to try that. Don't really want the domain name to be hard-wired, but if it works, then I'll go with it because the other approaches are so tricky (and I am a "detail" type of guy).

    I was able to get my site up again with the old domain name. FYI, I have the site cloaked since it is still messy/draft-ey, using "Ultimate Coming Soon" plug-in.

  4. GERADOMI
    Member
    Posted 1 year ago #

    However, I've discovered that I can visit my previous domain name at my site and my WP blog shows up perfectly, but when I add on the wp-admin extension to it in order to access my dashboard and press enter, it then points me to the new domain: smartgridix.com, but with a meaningless front page, and with the following URL in the URL box:

    http://smartgridix.com/wp-login.php?redirect_to=http%3A%2F%2Fixcollaborative.com%2Fwp-admin%2F&reauth=1

    I'm not sure how to read this, but it seems that the new domain name, smartgridix.com, is not connected to my wordpress dashboard/admin login?

  5. GERADOMI
    Member
    Posted 1 year ago #

    I still can't get into my old site or the same site with the new domain name. Breaking the problem down into digestible pieces:

    1. I added this code to my WP-config file below the top line which is: <?php
    define('WP_HOME','http://smartgridix.com');
    define('WP_SITEURL','http://smartgridix.com');

    2. I added this code into my twentytwelve theme/functions.php file, again below the first <?php :
    update_option('siteurl','http://example.com/blog');
    update_option('home','http://example.com/blog');

    3. I added this code into my twentytwelve child theme/functions.php file (I had to create a functions.php file first and this is the only entry) :
    <?php
    update_option('siteurl','http://example.com/blog');
    update_option('home','http://example.com/blog');
    >
    4. In my dashboard (Settings>General) of my original site, I changed the Home and Site URLs from the old URLs to the new URLs

    Now, when I browse to my old domain, the old site comes up for about 1 second and then it goes to a new site that says in its header smartgridix.com in its header, but has misc. stuff on the rest of the page. When I browse to my new site name, I also get this nonsense site, but I do not get the "skipping" through the old site front page first like I do above.

    Any and all help appreciated.

  6. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    Your domain is at Hostgator. You should contact them about the 500 error. It can take a while, 24-48 hours, for a site to propagate thru the web but yours should have by now.

    Registered through: GoDaddy.com, LLC (http://www.godaddy.com)
    Domain Name: SMARTGRIDIX.COM
    Created on: 24-Jan-13
    Expires on: 24-Jan-14
    Last Updated on: 26-Jan-13
    Domain servers in listed order:
    NS2199.HOSTGATOR.COM
    NS2200.HOSTGATOR.COM

  7. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    There should be a file manager here where you can confirm your install of wordpress. http://smartgridix.com:2082/?locale=en

  8. GERADOMI
    Member
    Posted 1 year ago #

    Thank u. That is helpful. I will follow up on your suggestions

Topic Closed

This topic has been closed to new replies.

About this Topic