
The WordPress plugin provides some handy options to make setting up a .probo.yaml file for your WordPress site easier. To use this plugin you must declare plugin: WordPressApp in a step in your .probo.yaml file.
WordPress core and plugins generally prefer absolute URLs for links and images instead of relative URLs. Because of the way WordPress sets up their internal settings, it means Probo needs to rewrite your data in order for links to work in the test environment. To do this, Probo provides an updated wp-config.php that has the Probo.CI build URL in it. This removes any customizations you have made to your configuration file. These can be re-added with the wordpressConfig configuration option where you define a list defines and values that are then plugged into your wp-config.php file.
wordpressConfig {object}This is a key-value pair object of items to be defined in your wp-config.php file that makes up your .probo.yaml file. This is specifically useful for custom items that are added to your WordPress configration that do not translate to your Probo build configuration.
wordpressDebug {bool}This is a boolean flag to indicate if your WordPress build will be in WordPress debug mode. This defaults to false.
database {string}The filename of the database to import if specified. Note that this database must be added to the Assets section separately.
databaseName {string}The name of the database. Defaults to wordpress.
databaseGzipped {boolean}Whether the database was sent gzipped and whether it should therefore be gunzipped before importing.
Sometimes it is necessary to have the latest wp-cli on your build. We frequently update our build containers to the tune of weekly or bi-weekly but no later than monthly and we package the wp-cli on our lamp stack containers. So this step is completely optional but was an issue in older versions of Probo. We’re including this in the event you run into compatibility problems or need a specific version of the wp-cli.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | assets: - wordpress.sql.gz steps: - name: Update wp-cli. plugin: Script script: - wp cli update --allow-root --yes - name: Site setup plugin: WordPressApp database: 'wordpress.sql.gz' databaseName: 'wordpress' databaseGzipped: true subDirectory: 'code' flushCaches: true |
subDirectory {string}The directory of the actual web root. Defaults to docroot.
flushCaches {boolean}Whether or not to flush the cache. Defaults to true.
updatePlugins {boolean}Whether or not to attempt to update any WordPress plugins to their latest versions. Defaults to false.
Using the WordPress plugin
This example takes a database and the assets from a WordPress site and integrates them into your Probo build. Keep in mind adding assets (depending on the size) will increase the disc space consumed on a per-container basis. That said, until a reliable module for proxying assets is available for WordPress, this is a suitable alternative for having assets viewable on your WordPress application.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | type: lamp php: 8.4 database: mariadb:11.4 assets: - example-database.sql.gz - uploads.tar.gz steps: - name: Setup Example.com WordPress Site plugin: WordPressApp database: example-database.sql.gz databaseGzipped: true subDirectory: web databasePrefix: 'ex_' phpIniOptions: memory_limit: 512M max_execution_time: 300 - name: Move files into place plugin: Script script: - cd /assets - tar -xvzf uploads.tar.gz - mv uploads /var/www/html/wp-content |

When you sign up for a Probo.CI registration code, you will get a two week trial of the plan of your choosing. For more information on how to get started, click here .
LEARN MORE ABOUT PROBO.CI'S PRICING