It will likely go easier on you if you develop the applications you wish to deploy using the ADT using the ADT but if you do have an application that you have developed elsewhere this process might make it possible for you to perform a successful migration.

WEBROOT

  • Download a copy of your website's webroot sourcecode from your current provider to your Linux laptop
  • Extract it (if it needs extracting, if not copy it) into a working directory (${working_dir} for example /home/bob/scratch).
  • Depending on what application you are deploying files which might be outside the webroot (for example moodledata for moodle) or private (for drupal) you need to make sure that if there are such directories they are present at the top level of your webroot. You can look at what is expected during installation of drupal by reviewing this

IF YOU WANT TO GIVE YOUR MIGRATED WEBSITE A DIFFERENT DOMAIN NAME TO WHAT IT PREVIOUSLY HAD, FOLLOW THIS NEXT STEP
(you can search and replace in a gui tool instead if you want across the entire webroot instead if you have a recursive find and replace function)
IF YOU ARE DEPLOYING TO THE SAME DOMAIN NAME AS YOU PREVIOUSLY WERE, YOU CAN SKIP THIS NEXT STEP

  • Copy and paste this shellscript to your Linux laptop and call it RemoveApplicationBranding.sh
#!/bin/sh

website_url="${1}"
working_directory="${2}"

root_domain="`/bin/echo ${website_url} | /usr/bin/awk -F'.' '{$1=""}1' | /bin/sed -e 's/^ //g' -e 's/ /./g'`"

/usr/bin/find ${working_directory} -type f -exec sed -i -e "s/${website_url}/applicationdomainwww.tld/g" -e "s/${root_domain}/applicationrootdomain.tld/g" {} \;

Run the script RemoveApplicationBranding.sh passing in the domain name that your website was deployed with for the provider that you are migrating from and the working directory where you extracted your webroot to as parameters, for example:

/bin/sh ./RemoveApplicationBranding.sh www.nuocial.uk /home/bob/scratch
  • Make sure dba.dat dbe.dat and dbp.dat (and for drupal dbt.dat) files are present and correct you can read more here. You might have to look in the .sql or .psql file referenced below to get the database prefix that you need for dbp.dat.

  • Remove any configuration files for example /home/bob/scratch/configuration.php for joomla or /home/bob/scratch/wp-config.php for wordpress

  • Create a private repository with your git provider

MAKE SURE THERE'S NO SENSITIVE DATA IN CONFIG FILES IF YOU ARE PLANNING TO MAKE YOUR REPO PUBLIC

<identifier>-webroot-sourcecode-baseline

and push the entire contents of your working directory to the repository in a similar way to this:

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/adt-apps/<identifier>-webroot-sourcecode-baseline.git
git push -u origin main

DATABASE

  • download a copy of a database dump of your website to your laptop and call it (mandatory exact naming don't call it anything else) "applicationDB.sql" for MySQL or "applicationDB.psql" for Postgres

IF YOU WANT TO GIVE YOUR MIGRATED WEBSITE A DIFFERENT DOMAIN NAME, FOLLOW THIS STEP
you can search and replace in a gui instead if you want
IF YOU ARE DEPLOYING TO THE SAME DOMAIN NAME AS YOU PREVIOUSLY WERE, YOU CAN SKIP THIS STEP

  • copy and paste the following shell script to your laptop and call it RemoveApplicationBrandingDB.sh

NOTE: change this script to be "applicationDB.psql" rather than "applicationDB.sql" if you are migrating a Postgres database to the ADT

#!/bin/sh

website_url="${1}"

root_domain="`/bin/echo ${website_url} | /usr/bin/awk -F'.' '{$1=""}1' | /bin/sed -e 's/^ //g' -e 's/ /./g'`"

/bin/sed -i "s/${website_url}/www.applicationdomain.tld/g" ./applicationDB.sql
/bin/sed -i "s/@${root_domain}/@applicationdomain.tld/g" ./applicationDB.sql
/bin/sed -i "s/${root_domain}/applicationdomain.tld/g" ./applicationDB.sql

Run the script RemoveApplicationBranding.sh passing in the domain name that your website was deployed, for example:

/bin/sh ./RemoveApplicationBrandingDB.sh www.nuocial.uk

NOTE: If you are changing the domain name of your website and you are deploying a wordpress application you will need to run applicationDB.sql through a tool called "serfix" for it to work correctly. You can find serfix here

  • Create a private repository called
<identifier>-db-baseline

with your git provider

MAKE SURE THERE'S NO SENSITIVE DATA IN THE DATABASE DUMP IF YOU ARE PLANNING TO MAKE YOUR REPO PUBLIC

  • Push the file applicationDB.sql to this repository similar to what follows:
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/adt-apps/<identifier>-db-baseline.git
git push -u origin main

You can now deploy your website as you would any other baselined website