Moving Joomla Site

airbornflghtairbornflght Houston, TX Icrontian
edited April 2008 in Internet & Media
Ok, right now the site I'm working on is at dev.okstatedelts.com and I want to move it to okstatedelts.com. How hard is this going to be to do? Right now there is a joomla 1.0 site on the domain that I am going to kill shortly before moving. The two sites or on different databases.

Comments

  • GrayFoxGrayFox /dev/urandom Member
    edited April 2008
    How exactly do you want to tackle this ?.

    The way I would do it is do a sql dump on the dev box for the db, and tar then scp the db and /var/www on the dev box to the production machine.
    mkdir ~/backup && mkdir ~/backup/www
    
    mysqldump –-user username here -p  dbname > ~/backup/dbbackup.sql
    
    cp -R /var/www/ ~/backup/www
    
    tar cf ~/backup.tar ~/backup
    
    scp backup.tar ipaddresshere:~/backup.tar
    

    After that import on the production machine.
    cd ~
    
    tar xf backup.tar
    
    cp -R ~/backup/www/* /var/www/
    
    #now restore the db backup
    mysql -u USER -p DBNAME < ~/backup/dbbackup.sql
    

    Some of the commands syntax might be wrong its been a while since ive had to do this and I dont have access to a shell right now.

    If you just want to change the domain just update the dns record.


    Also make sure you keep joomla up to date all the time that cms has more holes then swiss cheese.


    edit: Im assuming your on linux and running apache & mysql, If you arnt then these commands won't work.
  • airbornflghtairbornflght Houston, TX Icrontian
    edited April 2008
    the dev and production sites are on the same server.

    the dev site is just in a folder (dev) that is pointed to the subdomain dev.okstatedelts.com The database is already handled by mysql.
  • GrayFoxGrayFox /dev/urandom Member
    edited April 2008
    the dev and production sites are on the same server.

    the dev site is just in a folder (dev) that is pointed to the subdomain dev.okstatedelts.com The database is already handled by mysql.
    mkdir /var/www/oldsite && mv /var/www/* /var/www/oldsite
    mv whereeverthenewsiteis /var/www
    
  • airbornflghtairbornflght Houston, TX Icrontian
    edited April 2008
    GrayFox wrote:
    mkdir /var/www/oldsite && mv /var/www/* /var/www/oldsite
    mv whereeverthenewsiteis /var/www
    

    will there be any problems with the databases? I know how to move files and the such, I was just worried about the database or relative urls going to hell.

    Yup, just did that and came up with
    Warning: main(/home/okstated/public_html/includes/version.php) [function.main]: failed to open stream: No such file or directory in /home/okstated/public_html/oldsite/includes/joomla.php on line 71

    Fatal error: main() [function.require]: Failed opening required '/home/okstated/public_html/includes/version.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/okstated/public_html/oldsite/includes/joomla.php on line 71

    What started to worry me was this in the joomla global config on the backend:
    Absolute Path: /home/okstated/public_html
    Live Site: http://www.okstatedelts.com

    If I could figure out how to change those references I think it would work.
  • primesuspectprimesuspect Beepin n' Boopin Detroit, MI Icrontian
    edited April 2008
    No, the database is run by mysql, and has nothing to do with file locations
  • airbornflghtairbornflght Houston, TX Icrontian
    edited April 2008
    Ok, but that still doesn't fix the problem of when I move all the files from the /public_html/ to public_html/old/ that it all goes to hell.

    Right now the main site is on /public_html/ and the dev site is at /public_html/dev/ . I'd like to move the main site to /public_html/old/ and the new site to /public_html/.
Sign In or Register to comment.