1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Changing the domain name of a php web script

Discussion in 'Databases' started by chrisj, Nov 29, 2018.

  1. #1
    I am purchasing a web script and will be installing it on my host server where I have two domain accounts, and the domains are resolved to the server.
    I asked the developer if I decided to change the domain name, at some point after install, what I could do, and was told to make the change it the config.php file.
    After I make that change, and I make the changes needed in WHM/cPanel, besides copying the db over, what else would need to be done to have a complete domain change?
     
    chrisj, Nov 29, 2018 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #2
    That should be enough. The developer has something like <base href="<?php echo $your_url; ?>"> in the header that defines that the URL in the config.php file will be used throughout the entire site for relative URL addresses.
     
    qwikad.com, Nov 29, 2018 IP
  3. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    Thanks for your reply.
    Another question, when you typically purchase a web script, and go through the install process, it has you enter some info along the way - see attached image - where you're instructed to enter the purchase code, url, sql info, etc. My question is if the script is already downloaded on my pc how can it check for a correct Purchase code?
     

    Attached Files:

    chrisj, Nov 30, 2018 IP
  4. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #4
    The script cannot check for purchase code from your computer. When you will install it on the server, and when its installed, then those checks will be done in the backend.

    To move the script to another domain,
    1. take a database backup from current domain (phpmyadmin or cpanel)
    2. upload this database to another domain account using the same platform (phpmyadmin or cpanel)
    (first you will need to create the database on the new domain using cpanel)
    However, if both domains are yours, and on same server, then you can actually skip this step, and directly keep using the original database "without" ever transfering it.


    Then simply upload all the files to new domain's main directory (generally public_html)
    and then open your domain in browser.
    In your case, you will need to edit the config file to change domain name. You can do this in plain notepad.
     
    JEET, Mar 29, 2019 IP