• Bonjour!

    I’m using demo.sample.com as a development site for my wordpress site sample.com. Both sites (shared hosting on Mediatemple’s Grid service) are in separate directories/folders inside the domains folder.

    I want to change demo.sample.com to sample.com (ie. demo.sample.com will become the new sample.com).

    If I change the 2 domain URLs (in the WordPress Address and Site Address, in Settings -> General, of demo.sample.com) to sample.com, that leaves 2 wordpress installations with the same name in the domains folder.

    So before I do this, should I first rename the original sample.com (eg. to old-sample.com) before changing the 2 urls in demo.sample.com?

    In this scenario, will adding a permanent 301 redirect to old-sample.com’s htaccess file (ie ‘Redirect permanent / https://sample.com’ ) point its pages to any equivalent pages in the ‘new’ sample.com?

    Will this procedure correctly change demo.sample.com to sample.com?

    Thanks!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hi Shrinklady. Another option you might consider is copying your demo site to the real site using a plugin like Duplicator: https://www.ads-software.com/plugins/duplicator/.
    It will handle all the URL changes and updates for you.

    I second bdbrown’s suggestion of using Duplicator.

    You may find this step-by-step process I wrote to another user helpful, as their situation is similar to yours:
    https://www.ads-software.com/support/topic/giving-my-new-website-my-old-website-url?replies=4

    Thread Starter Shrinklady

    (@shrinklady)

    Yes bdbrown I looked at Duplicator, but I don’t understand how to use it in this scenario. If I use it to make a copy of demo.sample.com (after changing the WordPress Address and Site Address to sample.com), what happens to the pages in its database with urls beginning with ‘demo.’? Are they all automatically changed to the ‘sample.com’ format?

    In addition, won’t I lose any previous SEO ranking & indexed pages deriving from the old domain, sample.com?

    You don’t have to change the WordPress Address and Site Address when using Duplicator. As part of creating the package of the demo site, you will input the new URL that you want Duplicator to install the site under, and it will handle everything else, including database entries.

    You should not lose any SEO ranking, unless your redesigned site impacts your site’s SEO performance. In my experience, indexed pages will remain unchanged if the pages and navigation structure are the same on the new site.

    Thread Starter Shrinklady

    (@shrinklady)

    Thanks Nichlas, but I don’t have cpanel access in mediatemple, so unless I can implement your suggestions using phpmyadmin access to the database(s) it looks like I can’t use your solution.

    The plugin creates an install file and a complete copy of your site, including the database. You can download those two files to your local drive using FTP, then copy them up to the new domain folder after deleting everything in the target folder (so you should have a backup of your site before doing this). Then you run the install from the browser using the install URL, it installs your site and overwrites the existing database.

    As bdbrown suggests above, cPanel is not necessary if you are able to upload files to the destination website’s public_html (or equivalent thereof) directory.

    Thread Starter Shrinklady

    (@shrinklady)

    I’m not sure how to proceed from here.

    This is the structure of my domains folder:

    https://screencast.com/t/rGMH8IAubQ

    Both https://www.demo.drjanicestuart.com and https://www.drjanicestuart.com are live sites.

    I created a Duplicator package for https://www.demo.drjanicestuart.com.
    For the Installer inputs I used the database associated with demo.janicestuart.com,
    but the for the ‘New URL’ I input https://www.drjanicestuart.com

    Now, do I upload this package to the drjanicestuart.com folder (assuming everything
    will be overwritten), or do I just delete all contents of that folder
    and then upload and install the package based on https://www.demo.drjanicestuart.com?

    ( I created another package for the original https://www.drjanicestuart.com, but I
    understand that this is only for a backup – its database name, database username,
    and database password are irrelevant to this procedure. Could I use https://www.drjanicestuart.com/oldsite
    as the’New URL’ input for this package, or would that violate the rule that
    prohibits 2 wordpress installations in the same directory?

    Please advise.

    Actually there is an easier way really, the only thing you need to do is really go into the database your using and update the URL location reflect the real location. All you will need to do then is simply go in with FTP and move the files to the real location and it will grab the database and show everything as tho you never had to use another plugin for the content. Simple and easier then grabbing a plugin and trying to double your space usage really.

    You go into the root content folder of drjanicestuart.com and remove all the content from it, then upload the Duplicator archive and installer.php to that folder.

    The path to the root content folder is usually something like:

    1.) drjanicestuart.com/public_html/
    -OR-
    2.) drjanicestuart.com/htdocs/

    So, if you have a folder inside drjanicestuart.com called public_html or htdocs, check that it contains such things as wp-content, wp-admin, wp-includes, wp-config.php and possibly even wp-config-sample.php and/or .htaccess.

    If it has those folders and file(s), then that’s where you want to delete everything and upload the Duplicator package.

    Let us know how you fare along.

    Thread Starter Shrinklady

    (@shrinklady)

    Here’s the drjanicestuart.com html folder, with the blog sub folder:

    https://screencast.com/t/Jd1hThvshO

    All wordpress files are in sub-folder of drjanicestuart.com,
    so what happens to all the other files in the html folder?

    Should they also be deleted (before installing the Package for demo.drjanicestuart.com)?

    (before the site screwed up)

    I would suggest that you make sure your database and files are correct when you move them or you will have broken images, links, etc.

    Are you familiar with FTP? If then simply login and grab all the files then drag and drop them on to the folder location you to move them to.
    IF not then you will want to hire someone to help move them but first you will need to create them an FTP account so you can remove it once they are done.

    Hopefully that helps and gives you a good starting point.

    Thread Starter Shrinklady

    (@shrinklady)

    Sorry dcts, I’m not sure what you mean by ‘(before the site screwed up)’ ??

    BTW I’m using Filezilla, but can’t access the home folder.

    Here’s the details (I’ve sent this request into mediatempls support):

    SUPPORT REQUEST TO MEDIATEMPLE (COPY)
    I’m getting the error ‘Failed to retrieve directory listing’ when I try to connect to the home folder.

    ‘ Error: Directory /nfs/c06/home/mnt: permission denied ‘

    see screenshot:

    https://screencast.com/t/YvW7XIUvj1B

    SFTP SETUP:
    host: sftp://s93318.gridserver.com

    username: myshrink.com

    Server Admin password: is o.k.

    port: 22
    END OF SUPPORT TICKET

    Thread Starter Shrinklady

    (@shrinklady)

    OK, now I have Filezilla working!

    dcts, you wrote “If then simply login and grab all the files then drag and drop them on to the folder location you to move them to.”

    Do you mean grab all the files in demo.drjanicestuart.com and (without changing any urls??) and drop them into the drjanicestuart.com folder? Do I first delete the contents of the drjanicestuart.com folder?

    Thread Starter Shrinklady

    (@shrinklady)

    The Happy Ending….

    I ended up getting a Fiverr guy to do this($20.)since I wasn’t confident to do it myself based on the advice given here. After all, this was the site of my best client, and I didn’t want to take the chance of messing it up and losing her #2 Google local search ranking.

    Here’s what he did: “I swapped the folders so demo.drjanicestuart.com now holds the old site and drjanicestuart.com holds the new.

    I’ve also ran multiple database queries to update all demo.drjanicestuart.com URLS (such as video, images, site URL etc) to drjanicestuart.com. The site is now live at drjanicestuart.com: https://puu.sh/p1xit/c4d9696b5a.jpg…”

    What made me particularly nervous was the ‘PHP Setup’ warning I kept getting in Duplicator (free version) after every scan, to wit:

    ” Open Base Dir: ‘/nfs:/tmp:/usr/local:/etc/apache2/gs-bin’
    Issues might occur when [open_basedir] is enabled. Work with your server admin to disable this value in the php.ini file if you’re having issues building a package. “

    I kept getting this warning even after I deleted the open_basedir string from the php.ini file.

    Anyway, thanks to all who took the time to help out!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘how to change domain name – shared hosting’ is closed to new replies.