WordPress.org

Forums

Quick Page/Post Redirect Plugin
[resolved] Remove, uninstall & clean database (8 posts)

  1. dermotholmes
    Member
    Posted 3 years ago #

    How do I remove all traces this plugin might have written to the database?

    Is there an automated way?

    http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/

  2. prophecy2040
    Member
    Plugin Author

    Posted 3 years ago #

    There is no automated way, but all the data is stored in the meta data and a few options. All the meta fields start with '_pprredirect' and the options start with 'ppr_', except one which is called 'quickppr_redirects'.

    If you need help, let me know and I'll give you a hand on what you need to do to remove them all.

  3. dermotholmes
    Member
    Posted 3 years ago #

    Cheers, already headed down that path :)

  4. PostcardFoxy
    Member
    Posted 3 years ago #

    is that meta data in the database? or elsewhere. I have the same problem and am trying to remove all redirects and obviously need to get more nitty gritty.

    Thanks,
    Fox

  5. prophecy2040
    Member
    Plugin Author

    Posted 3 years ago #

    Yes it is in the database.
    You could add something like this to theme functions.php file to get rid of everything:

    <?php
    add_action('init','clear_ppr_data');
    function clear_ppr_data(){
    	global $wpdb;
    	if(get_option('deleted_ppr') != '1'){
    		//check if option exists, if not, then delete meta
    		$sqlmeta = "DELETE FROM $wpdb->postmeta WHERE meta_key LIKE '_pprredirect%';"
    		$sqloptions = "DELETE FROM $wpdb->options WHERE option_name LIKE 'ppr_%' OR option_name = 'quickppr_redirects';"
    		$wpdb->query($sqlmeta); //clear meta
    		$wpdb->query($sqloptions); //clear options
    		add_option('deleted_ppr','1'); //add our check option
    	}
    	return;
    }
    ?>
  6. joshwb84
    Member
    Posted 3 years ago #

    I tried implementing the PHP code above directly at the top of my functions.php file, with no luck. Do I need to attach any code around it?

    Unfortunately, I don't have access to the database where I can manually extract whatever was installed in my database.

    Im using Worpress 3.4.1 but may not be using PHP 5 (not sure)

    Original Problem: Installed the Quick redirect plugin, attempted to redirected a page but the redirect kept changing my permalink. I UNinstalled the plugin but the redirect still occurs.

    I was trying to redirect .../blog/about TO /blog/about/how-we-work

    However, now .../blog/about/ REDIRECTS to .../about/ which doesn't exist.

    Thanks in advance for any help I can get on this !

  7. prophecy2040
    Member
    Plugin Author

    Posted 3 years ago #

    You should just be able to add the code to the very top of the functions file and it should work to get rid of all installed items.

    On the other issue with the /blog/about/ going to /about/, that is generally due to pages or post with the same name - usually sub-pages. What happens is WordPress finds the first matching item in the permalinks when there is another page/post by that name (even thought the category or parent page may be different).

    Try rebuilding your permalinks (just go to Permalinks under Settings and it will rebuild them). Then you might be able to create the redirect successfully.

    As a last resort, you could always create an about page with no content and have it redirect to the how-we-work page using the plugin - and since WP is redirecting the /blog/about/, you would get there in a round about way (it would be seamless to the user - but WP would do a few redirects).

    Best of luck
    Don

  8. joshwb84
    Member
    Posted 3 years ago #

    Hey Don, thanks for the response. Unfortunately, your recommendations did not work.

    On the other issue with the /blog/about/ going to /about/, that is generally due to pages or post with the same name - usually sub-pages. What happens is WordPress finds the first matching item in the permalinks when there is another page/post by that name (even thought the category or parent page may be different).

    This problem did not occur until after I installed the plugin, attempted to redirect /blog/about/ to its child page /blog/about/how-we-work/. The URL would then take out the /blog/ part and I would receive the following error "Assembler error
    Can't find a definition for "error_404" in the file data/pages.txt."

    Then I uninstalled the plugin and same problem occurs. There are NO other pages or posts causing this. I deleted all relevant pages, reset permalinks, and problem still occurs.

    Ill keep searching :/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Quick Page/Post Redirect Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.