What is Subdirectory publish?

If your main site is hosted elsewhere, you may now publish a Shifter site as https://example.com/my-shifter-site/ without publishing to your main sites server.

Note: No nested subdirectory supported. Only single subdirectory is supported.

Enabling Subdirectory Publish

1. Navigate to [Settings]

2. Scroll down to the [Subdirectory Setting] section

Subdirectory publish is disabled by default.

3. Input your desired subdirectory name and click [update]

4. Subdirectory publish is now enabled

5. Navigate back to your site’s [Overview] page. Then, start WordPress.

WordPress will now operate as a subdirectory install.

6. Generate a new artifact and publish.

7. Your sites artifact will now be published in a subdirectory.

Some notes on enabling subdirectory support

The path of the media files on your posts will not be changed wether you change the name of the subdirectory. You should rename or replace it manually.

For instance, if you update the name of your subdirectory from name-of-subdirectory to renamed-subdirectory or you simply delete the subdirectory name from the Shifter dashboard, the paths to the media files on your posts will still exist as name-of-subdirectory .


Current subdirectory name: name-of-subdirectory

  • Path to media: /name-of-subdirctory/s3://shifter-media-cdn/caa65008efb706a8bfc6f7e4045d6a018420c3df/uploads/2019/12/example.png

New subdirectory name: new-name-of-subdirectory

  • A new path to media: /name-of-subdirctory/s3://shifter-media-cdn/caa65008efb706a8bfc6f7e4045d6a018420c3df/uploads/2019/12/example.png

Subdirectory Disabled:

  • A new path to media: /name-of-subdirctory/s3://shifter-media-cdn/caa65008efb706a8bfc6f7e4045d6a018420c3df/uploads/2019/12/example.png


  • You can rename the media file paths by using a search and replace plugin such as Better Search Replace or Search Replace.
  • If you only have a few media files, you can rewrite the path directly within the Block Editor (use Edit as HTML feature)
  • Be sure to replace your files url with the same path as your updated WordPress subdirectory name.

Be sure to generate and publish a new artifact to see your subdirectory settings reflected on your published site.

Handling with robots.txt and sitemap.

  • You can get robots.txt under /{name-of-subdirectory}/robots.txt.
  • You may also find sitemap.xml under /{name-of-subdirectory}/sitemap_index.xml if Yoast SEOis enabled. Other XML Sitemap plugin such as Google XML Sitemaps won’t export XML Sitemap to the subdirectory.

Related Posts