IAS elearning Theme with plugins in /plugins/ folder
php scripts/database/migrations generate
cd config; ansible-playbook -i inventories/development docker.yml to download TF Data and create a .envdocker-compose updocker-compose updocker build -t thefreshuk/ias-elearning:VERSION . && docker push thefreshuk/ias-elearning:VERSIONAddition of a new course can be done on any environment but is best done locally and then exported using tf-data.
wp tf-data export-pages <page-slug> --post-type=product
wp tf-data export-pages <page-slug> --post-type=sfwd-courses
You can export multiple lessons at once by space separating the slug.
wp tf-data export-pages <page-slugs> --post-type=sfwd-lessons
php scripts/database/migrations generate
You'll need to edit the generated file and import all the xml files that have been generated.
<?php
...
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$array = [
"_course_product.xml",
"_sfwd-courses.xml",
"_sfwd-lessons.xml"
];
sh("wp tf-data import-xml ". implode(' ', $array));
}
...
If for some reason you need to re-run a migration you can use the execute command to rollback the migration, and then run it again without the --down option to re-execute it.
php scripts/database/migrations execute <migration id> --down
Since the env sync seems to be haivng issue with trashed pages this is how im doing it now.
SSH into Staging:
cd ~/elearning/current/src; sudo wp --allow-root tf-data export-pages '{page_url}' --post-type={post_type}
Then to get from Staging on your local machine run - This will copy the staging resources folder into test/ folder located in your ias-elearning/ folder :
scp -r -i ~/.ssh/IAS_Elearning.pem [email protected]:~/elearning/current/src/resources test/
You will then need to find the page you exported. Jsut a note sometime it doesnt like overwriteing XML so you might need to manaullyt remove the old xml file.
Content type
Image
Digest
sha256:4e9255509…
Size
816.5 MB
Last updated
1 day ago
docker pull thefreshuk/gradle-php