Testing process
- Ideally, make the web.config file, root directory or .htaccess file unwritable. If that's not possible in your installation, adjust conditions within options-permalink.php to return true to force each error (see below).
- Navigate to Settings -> Permalinks.
- If you changed file/directory permissions, select a different permalink option and Save changes. (If conditions are forced, the error shows automatically.)
- Scroll down to find the error message.
- Check for a label with the read-only form element.
Ways to fake each situation
web.config
is not writable
Replace the 3 consecutive conditional statements with true statements:
if ( $iis7_permalinks ) :
if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
if ( file_exists( $home_path . 'web.config' ) ) :
root directory is not writable to edit/create web.config
Replace only the first 2 conditions with true statements (file_exists( $home_path . 'web.config' )
needs to remain false):
if ( $iis7_permalinks ) :
if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
.htaccess
is not writable
Only replace this statement with a true condition:
if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $htaccess_update_required ) :