No internet connection
  1. Home
  2. Support

How to export when using Bedrock by roots.io?

By Leon Stafford @leonstafford2018-12-16 17:50:54.478Z

What settings should be used?

Due to the custom directory structure, this was not supported in versions up to 5.8, but is now possible.

  • 1 replies
  1. Leon Stafford @leonstafford2018-12-16 18:00:21.794Z

    Here's a group of settings for an example Bedrock site, with the following site:

    http://example.test
    vagrant@example:/srv/www/example.com/current/web$ tree -L 2
    .
    ├── app
    │   ├── cache
    │   ├── mu-plugins
    │   ├── plugins
    │   ├── themes
    │   ├── upgrade
    │   └── uploads
    ├── index.php
    ├── wp
    │   ├── index.php
    │   ├── license.txt
    │   ├── readme.html
    │   ├── test.html
    │   ├── wp-activate.php
    │   ├── wp-admin
    │   ├── wp-blog-header.php
    │   ├── wp-comments-post.php
    │   ├── wp-config-sample.php
    │   ├── wp-content
    │   ├── wp-cron.php
    │   ├── wp-includes
    │   ├── wp-links-opml.php
    │   ├── wp-load.php
    │   ├── wp-login.php
    │   ├── wp-mail.php
    │   ├── wp-settings.php
    │   ├── wp-signup.php
    │   ├── wp-trackback.php
    │   └── xmlrpc.php
    └── wp-config.php
    
    

    Deploy tab

    • Destination URL http://example.test/wp/mystaticsite/
    • Target Directory /srv/www/example.com/current/web/wp/mystaticsite

    Crawl tab

    • nothing set here

    Processing tab

    • Rewrite Links in source code
    wp/wp-content/themes/twentyseventeen/,wp/contents/ui/mytheme/
    wp/wp-includes/,wp/inc/
    
    • Rename Exported Directories
    wp/wp-content,wp/contents
    wp/contents/themes,wp/contents/ui
    wp/contents/ui/twentyseventeen,wp/contents/ui/mytheme
    wp/wp-includes/,wp/inc/
    

    And that's it!

    Resulting archive should appear as:

    vagrant@example:/srv/www/example.com/current/web/wp/mystaticsite$ tree -L 2
    .
    ├── 2018
    │   └── 12
    ├── app
    │   └── cache
    ├── author
    │   └── admin
    ├── category
    │   └── uncategorized
    ├── comments
    │   └── feed
    ├── favicon.ico
    ├── feed
    │   └── index.html
    ├── hello-world
    │   ├── feed
    │   └── index.html
    ├── index.html
    ├── robots.txt
    ├── sample-page
    │   ├── feed
    │   └── index.html
    ├── sitemap.xml
    └── wp
        ├── contents
        ├── inc
        └── wp-admin
    
    19 directories, 7 files
    

    This was done with Autoptimize and Yoast installed, so your actual number of files may differ.