Checking out your site from the Advantage Labs managed build

These directions should help you check out your site from Advantage Labs' Subversion repository. These directions assume a basic understanding of Subversion techniques. You will need a subversion client in order to connect to your repository

Each Advantage Labs managed site has it's own repository, available for checkout at:

http://svn.advantagelabs.com/sites/foo.com

Where foo.com is the name of your website. We also have an example repository for anyone to checkout, available at that URL.

When you check out this repository you will get a complete drupal site that you can use for testing, modifications, and other uses. You can modify any file locally, but you are only allowed to checkin changes to your site's local files.

Checkout using Windows

To complete these directions your will need the following free applications:

In these directions, replace "example.com" with the domain name of your site. You may find it beneficial to read some of the documentation on XAMPP and TortoiseSVN if you have not used those applications before.

Steps for checking our your Advantage Labs site and creating a working local copy: 

  1. Install XAMPP and enable it
  2. Open Firefox and visit "localhost"
  3. Using PHPMyAdmin create a new database "example"
  4. Upload your database file to the database you just created.
  5. Install Tortoise SVN
  6. Go to XAMPP/htdocs/
  7. right click in directory and checkout http://svn.advantagelabs.com/sites/example.com
  8. Click through the drupal to branches/drupal-5/drupal
  9. Delete "sites" file
  10. Go back up one directory, and copy sites folder into drupal folder
  11. Go to drupal/sites/example.com
  12. Open settings.php in Notepad++
  13. Change the line that says, $db_url = 'mysqli://...' to 'mysqli://root@localhost/example'
  14. Open XAMPP/apache/conf/httpd.conf in notepad++
  15. Uncomment the line # from #LoadModule rewrite_mdoule modules/mod_rewrite.so
  16. Open XAMPP/apache/conf/extra/httpd_vhosts.conf
  17. Remove the # form the NamedViutalHost line
  18. Remove the #s from the first example
  19. Change the docroot to be C:\Program Files\XAMPP\htdocs\drupal\branches\drupal-5\drupal
  20. Replace all @...@ with logs/example.com
  21. Using notepad++, go to C:\Windows\System32\drivers\etc\hosts
  22. add a new line: "127.0.0.0    local.example.com"
  23. Restart XAMPP
  24. You should now be able to browse to local.example.com in Firefox and see your site.

 

Checkout Using UNIX Command Line

For example, let us say I wanted to check out foo.com and add a new Drupal module to my site. This example is done using a command line SVN client in Mac OS X.

$ svn co http://svn.advantagelabs.com/sites/foo.comA foo.com/drupalA foo.com/drupal/branchesA foo.com/drupal/branches/drupal-5A foo.com/drupal/branches/drupal-5/sitesFetching external item into 'foo.com/drupal/branches/drupal-5/drupal'... many other external items fetched ... $ cd foo.com/drupal/branches/drupal-5/sites/foo.com/modules/$ cp -r path/to/fieldactions .$ svn add fieldactionsA foo.com/modules/fieldactionsA foo.com/modules/fieldactions/fieldactions.moduleA foo.com/modules/fieldactions/README.txtA foo.com/modules/fieldactions/fieldactions.info$ svn ci -m "Here is a commit message"

This same task can be accomplished with GUI SVN clients and drag and drop tools. Other UNIX variants should follow the same course.

If you plan to have a local testing copy of the site, it can be helpful to create a copy of the site settings. You will need this to point to a local database. For example,

$ cd ~/Sites/foo.com/drupal/branches/drupal-5/sites/$ mkdir local.foo.com$ cd local.foo.com$ cp -r ../foo.com/settings.php .$ ln -s ../foo.com/modules$ ln -s ../foo.com/themes$ ln -s ../foo.com/files

Using symlnks (the ln command) allows you to use the same modules and themes as the real foo.com site, but you can edit your settings.php file to point to your local database. We recommend you do not check this local.foo.com folder into subversion.

Your rating: None Average: 1 (2 votes)

Comments

Post new comment

  • Allowed HTML tags: <a> <img><b><i> <em> <h1> <h2> <h3><h4><h5><h6> <sub> <super> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br> <p><sup>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options