• If I move from one domain to another, the generated shortlinks still point to the old domain. Is there a simple way to regenerate all shortlinks? It worked to clear all the _wpbitly entries from the postmeta database table, but I would prefer a simpler solution for the client I’m working with.

    https://wordpress.org/plugins/wp-bitly/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter joleksow

    (@joleksow)

    It would actually be great if you could just add a button to the admin screen called “Clear Shortlinks” or something like that that runs this code from uninstall.php:

    $posts = get_posts('numberposts=-1&post_type=any&meta_key=_wpbitly');
    
        // And remove our meta information from them
        // @TODO benchmark this against deleting it with a quick SQL query. Probably quicker, any conflict?
        foreach ($posts as $post)
            delete_post_meta($post->ID, '_wpbitly');

    Similarly I would think it awesomely useful to have a “Generate Shortlinks” method/button/utility that would roll through all posts & pages and generate shortlinks for them in the postmeta table. This for users that have posts created before installing WP Bitly, but want bitly URLs to be used by the Sharing (and other) options.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Moving domain and regenerating shortlinks’ is closed to new replies.