Let me say beforehand that when using add_rewrite_rule()
nothing is written to the htaccess file. Rewrite rules are stored in the database and handled by WordPress internally on PHP level.
TL;DR: Rewrite rules do persist after plugin deletion, but probably not the way you’d expect it.
When using add_rewrite_rule
these rules are added in the options table in the database. You then need to flush the rewrite rules via flush_rewrite_rules()
(Visiting Settings > Permalinks and saving does the same) for them to come in effect.
Similarly when you remove your plugin that added the rewrite rules they stay in effect until the next flushing of the rewrite rules. So yes they persist, but they will disappear at some random point later on when the rewrite rules are flushed.
Related Posts:
- Apache rewrite rules and wordpress problem
- Custom pages with plugin
- Add rewrite rule to permalink structure
- add_rewrite_rule, plugin activation and plugin deactivation
- Does flush_rewrite_rules() remove all rules added by other plugins as well as mine?
- Add_rewrite_rule doesn’t add custom url in plugin
- flush_rewrite_rules() not working on plugin activation
- Redirect to another page using contact form 7? [closed]
- Remove .htaccess portion upon plugin deactivation?
- Custom url rewriting
- WordPress rewrite rules not working
- WordPress rewrite rule depend on meta values not ids
- Custom pages with plugin
- Add Rewrite Rule for custom page
- What is the best way to output plugin result in certain url
- flush_rewrite_rules not working on plugin deactivation, invalid URLs not showing 404
- Custom rewrite rule is not picked by WordPress
- Add .html extension to custom post type taxonomies
- How can I rewrite a plugin generated URL?
- WordPress custom URL Rewrites redirecting not masking
- Write to / remove from default .htaccess file from plugin?
- Best way to hook a custom url?
- Remove rewrite rules generated by plugin during deactivation
- How does WP handle multiple matching rewrite rules?
- How to Create a Custom Plugin Permalink
- Custom rewrite rules not working with WPML
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- How to Create a Custom Slug for Tags and Categories with a prefix or suffix?
- Edit Permalink Structure For Custom Post Type or Modify .htaccess?
- URL rewrite with external JSON query
- How to rewrite URL and get the values?
- How to embed a new string in url?
- i want to rewrite my custom plugin url
- can’t install any wp plugins [duplicate]
- add_rewrite_rule to load different page, without changing URL in browser
- How To Use htaccess to Rewrite Link Structure for a Page that is Generated Programatcially
- Change custom rewrite rule when permalink is updated/changed
- URL Rewrite 404
- Help Code Review – I need to write on .htaccess file from theme’s function.php
- Change default url to plugin custom post type
- How To Rewrite WordPress Pages URL Only?
- WP Job Manger change jobs url (NOT slug)
- Please Check this ‘.htaccess’ File
- How to rewrite URL using .htaccess in WordPress Plugin
- Why do I get this “plugin does not have a valid header” error?
- WordPress Capabilities: edit_user vs edit_users
- Making plugin unique to not conflict with plugins with the same name
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- How to get posts by content?
- Force plugin to fail activation
- How can I serve a text file at a custom URL
- Plugin not saving values when placed in a folder within /wp-content/plugins
- How to integrate plugin in WordPress theme
- Is license need for free wordpress plugin
- Getting a List of Categories for Use in a Plugin?
- How to get all of the activate_plugin action parameters?
- Display update notification messages like ‘What’s New’
- How can I make 2 plugins that include different versions of a framework to both use the latest version?
- Add Plugin options as subpage to Theme options page
- Image upload and download from front-end
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- correct way to include a library(and its dependent libraries) in wordpress development
- Issue Tracker from pre exsisting table [closed]
- WP_Terms_List_Table Quick Edit not working
- Git Hosting for WordPress SVN Plugin Repository [closed]
- How to exclude certain files from the plugin editor?
- Stop Plugin from Getting Styles from Other Plugin
- WordPress REST API Plugin Development – Add Custom Endpoint
- Hook into the rendering of a WordPress Template
- Default taxonomy template in plugin, override in theme
- WordPress gtag.js with User ID tracking
- wp_loaded with static Singleton
- How to remove a CPT Menu from the Root Admin only
- Get post_id on clicking a link in WordPress
- WordPress.org: How to add a plugin for certain countries?
- Calling a save function from a “submit” button
- Wp Debug Enabled True Notices and Warning
- How to add img into a plugin?
- How to log custom plugin error to debug.log file
- How to create admin setting for this small plugin
- How to fix caching issue in PHP data from database
- Adding shortcodes to multiple pages with function
- SASS not showing in customized preloader plugin
- How to securely controlling data without keeping it in postmeta?
- Get a list of Product Categories inside a loop
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Using multi-dimensional array with filter
- wordpress ajax pagination object value does not change
- Google analytic issue in wordpress
- How to insert category name above post title in a featured pages plugin?
- Displaying friend’s posts only
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- How to set-up multiple cron task with wp_schedule_event so that they do not overlap?
- How to get the real address from a url (permalink)
- Modifying lightbox plugin to allow for quoting, Does this exist? [closed]
- Plugin version number after code rewrite [closed]
- How to escape html code?
- wp_handle_upload – specified file failed upload test
- How to make a Template page to show the information of different things Shop and Product page?