Skip to content

Instantly share code, notes, and snippets.

@bkonia
bkonia / bss_to_wordpress.php
Created January 27, 2018 23:45
BSS to WordPress - Automatically Publishes Bootstrap Studio Exports to WordPress
#!/usr/local/bin/php
<?php
/* This script automatically publishes BSS exports to WordPress.
* Install Composer from https://getcomposer.org/ . Composer needs to be installed on your local computer where BSS is installed, NOT on the server.
* Use Composer to install QueryPath (also on your local computer), following the instructions at https://github.com/technosophos/querypath
* On the server, install the JSON Basic Authentication WordPress plugin from https://github.com/WP-API/Basic-Auth
* Create an ini file in the bss_exports parent directory, containing values for base_url, wp_username, wp_password.
* BSS automatically creates an assets folder in the export directory. This folder contains subfolders for css, images, js, etc... To automatically upload assets, provide ini values for ssh_username, ssh_host, ssh_path (file system path to your public web directory with no trailing slash)
* In BSS, create a meta tag for each page you want to publish.