Cloning oscommerce website for development

  1. Create dev.domain.tld site in hosting control panel.
  2. Create the database and user.
  3. Copy over the database and files.
  4. Update the database and user info in "includes/configure.php" and "admin/includes/configure.php".
  5. Also update the file paths in the configure.php files.
  6. Update the links to point to the development site:
    $ for x in `grep -r www.domain.tld * -l` ; do perl -pi \
      -e 's/www\.domain\.tld/dev\.domain\.tld/g' $x ; done
  7. Optionally disable SSL in "includes/configure.php".
  8. Change ownership of files as required.
  9. Login in as admin and change the cache location.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

restrict access

In addition, close out access to others and ensure it is only accessible via IPs of the dev team.

In .htaccess, include:

RewriteEngine On
Options +FollowSymLinks
RewriteBase /

# Redirect others to main site:
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx$
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx$
RewriteRule ^(.*) http://www.domain.tld/$1 [L,R=301]

Replace 'xx.xx.xx.xx' with the dev team IP addresses.

Comment