Title: WP static permalink
Last modified: February 12, 2026

---

# WP static permalink

 *  [supachupa](https://wordpress.org/support/users/supachupa/)
 * (@supachupa)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/wp-static-permalink/)
 * I am using a WordPress install not publicly accessible and then using WP static
   to publish the posts online as static HTML. This plugin is posting the local 
   non-routable URL. How can I specify the public URL instead?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwp-static-permalink%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jan Boddez](https://wordpress.org/support/users/janboddez/)
 * (@janboddez)
 * [3 months, 1 week ago](https://wordpress.org/support/topic/wp-static-permalink/#post-18825966)
 * Oh, I hadn’t yet heard of that use case!
 * You should be able to filter the status messages, like use PHP’s `str_replace()`
   to replace the local with your public domain. This of course requires you’re 
   able to add code snippets someplace, like in `functions.php`, a custom (must-
   use) plugin, or through the use of a separate “code snippets” plugin:
 * Just a quick example:
 *     ```wp-block-code
       add_filter( 'share_on_mastodon_status', function( $status, $post ) {  $status = str_replace( 'http://localhost.test/', 'https://www.example.org/', $status );    return $status;}, 10, 2 );
       ```
   
 * This would modify the message before it gets sent to your Mastodon server.
 * Of course, depending on how or when the static pages are pushed to your web host,
   Mastodon instances might temporarily hit a 404 and cache the wrong link preview
   data. (It might be possible to work around that by setting a delay, under the
   plugin’s advanced settings. But maybe I’m overthinking things.)

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwp-static-permalink%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/share-on-mastodon/assets/icon-256x256.png?rev=2939211)
 * [Share on Mastodon](https://wordpress.org/plugins/share-on-mastodon/)
 * [Support Threads](https://wordpress.org/support/plugin/share-on-mastodon/)
 * [Active Topics](https://wordpress.org/support/plugin/share-on-mastodon/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/share-on-mastodon/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/share-on-mastodon/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jan Boddez](https://wordpress.org/support/users/janboddez/)
 * Last activity: [3 months, 1 week ago](https://wordpress.org/support/topic/wp-static-permalink/#post-18825966)
 * Status: not resolved