moving elgg to a different url

I have created a new account in whm for the new domain. I have uploaded all of the default elgg folders and am on the installation/data base set up welcome page.  After I finish the default set up to the new account/domain and test all the mods and functions...how do I import all of the user and user data from the production site?

Can I just point to the existing database that the production site is using and then 301 redirect the production site to the new domain?  Or should I backup the existing database and rename/restore it for the new account to use?

Or is the best way to copy the entire production account/site to the new account using shell?  If so..how do I edit the admin>>>>adminstration>>>site url for the copy without logging into the elgg admin?  Obviously the copy will still log me into the production site due to the site url setting being the production site.

 

  • I would say to be safe copy the entire thing.

    I have had success doing this from a development server to production, here's the steps I take:

    1. Back up the database from the development server
    2. Import the database into your production server
    3. Zip up the entire dataroot directory of your development server and move it to the production server
    4. Zip up the elgg directory of the dev server an move it to the production server.
    5. Edit /engine/settings.php with updated database credentials (if database name or user/password have changed
    6. Manually edit the database to change a few entries
      • Table: datalists - path and dataroot may need to be updated (don't forget trailing slash)
      • Table: sites_entity - URL may need to be updated (don't forget trailing slash)
    7. Visit the site and clear all of the cache

     

    For example, my dataroot and path on my dev server are something like "/var/www/elggdata" and "/var/www/elgg" but on the production server it's something like "/home/<username>/elggdata" and "/home/<username>/public_html/elgg"

     

    Hope that helps somewhat.

  • I have hit a snag. I have elgg on the new account/url now in its default state but when I point to the production database using settings.php all of the links then point to the production site. The same occurs if I rename the database and restore it to the new account. How do I move all of the members and content to the new account/url?

  • Have you edited the Db and changed the site URL?

  • I have changed the url in the elgg admin>>>site settings

     6. Manually edit the database to change a few entries

    No. I have not manually edited the database. What do I need to edit?

    I think this is the doc

    http://docs.elgg.org/wiki/Duplicate_Installation

  • ???

    6.  Manually edit the database to change a few entries
        . Table: datalists - path and dataroot may need to be updated (don't forget trailing slash)
        . Table: sites_entity - URL may need to be updated (don't forget trailing slash)

    ques = already answered ! ;-)

  • thanks drup...ok so I am looking at datalists in phpmyadmin and have no idea what I am supposed to be editing nor how or where I am supposed to make these edits. Is there an elgg/phpmyadmin editing step by step somewhere?

    I have moved vbulletin forums before and never had to manually edit the database...is this not what config files are for?

  • Thanks that's what I needed.