When to call `add_rewrite_rule` for safety

The easiest solution to this is to hook your add calls on to the last action which gets fired before the rules are rebuilt during the flush process. The first part of the flushing process is to delete the rewrite_rules option. When this happening the following actions will fire: do_action( ‘delete_option’, $option ); do_action( “delete_option_$option”, … Read more

How to build custom WP admin with custom URLs

WordPress has some pretty solid documentation for this. What you are asking for will require that you learn a good bit of programming. Check out here for basic plugin development information: https://codex.wordpress.org/Writing_a_Plugin This page has specific information about making your own administration panels: https://codex.wordpress.org/Adding_Administration_Menus If this is something you are passionate about I would consider … Read more

Remove subfolders from URL

You need to make the WP site url and home url differ in Settings / General. The home url should be example.com, while the site url (where WP lives) should be example.com/wp (or wherever you put it). You can hardcode these in your config file: define(‘WP_HOME’, ‘http://example.com’); define(‘WP_SITEURL’, ‘http://example.com/wp’); WP should know how to take … Read more