To remove the WP Ghost rewrite rules from the WordPress definition in .htaccess, simply:

  1. Go to WP Ghost > Advanced > Compatibility.
  2. Switch off the option Add Rewrites in WordPress Rules Section.
  3. Click the Save button to apply the changes.

This will ensure WP Ghost adds the rewrite paths before the WordPress rewrite rules, without interfering with the # BEGIN WordPress and # END WordPress section.

Alternatively, you can add the following line to your wp-config.php file:

define( 'HMW_RULES_IN_WP_RULES', false );

This will prevent WP Ghost from adding its rules to the WordPress rewrite rules section.