Skip to content

Instantly share code, notes, and snippets.

@m-thomson
Last active August 25, 2017 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-thomson/fff3ee3fc206f3e4139fcace0df73dd7 to your computer and use it in GitHub Desktop.
Save m-thomson/fff3ee3fc206f3e4139fcace0df73dd7 to your computer and use it in GitHub Desktop.
Create "friendly" URLs to access your WP All Export data feed like http://example.com/get-feed.php . Just (1) change the URL where indicated (2) name this file what you want and (3) upload it to your server. When this script is fetched the user will be transparently redirected.
<?php
// Redirect browser to the WP All Export feed of your choice. Just put the correct URL below.
// Note: Anyone could access your data if they guess the URL of this script. You can gain a little protection by naming
// it something "unguessable". For proper security you should use an .htaccess rule or other mechanism.
// Disclaimer: This is provided with the hope it will be useful but custom PHP is not officially supported.
$url = "http://example.com/wp-cron.php?export_hash=ed5a94029a05b1c9&export_id=1&action=get_data";
header("Location: $url");
exit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment