Title: Custom .htaccess rules manager
Author: Peter Duchnovsky
Published: <strong>21 de julio de 2025</strong>
Last modified: 24 de julio de 2025

---

Buscar plugins

![](https://ps.w.org/custom-htaccess-rules/assets/icon.svg?rev=3331175)

# Custom .htaccess rules manager

 Por [Peter Duchnovsky](https://profiles.wordpress.org/pdux/)

[Descargar](https://downloads.wordpress.org/plugin/custom-htaccess-rules.1.0.0.zip)

 * [Detalles](https://es.wordpress.org/plugins/custom-htaccess-rules/#description)
 * [Valoraciones](https://es.wordpress.org/plugins/custom-htaccess-rules/#reviews)
 *  [Instalación](https://es.wordpress.org/plugins/custom-htaccess-rules/#installation)
 * [Desarrollo](https://es.wordpress.org/plugins/custom-htaccess-rules/#developers)

 [Soporte](https://wordpress.org/support/plugin/custom-htaccess-rules/)

## Descripción

The «Custom .htaccess rules manager» plugin provides a secure and intuitive interface
within your WordPress admin dashboard to manage custom rules for your .htaccess 
file. This powerful tool allows you to insert specific rules at both the very beginning
and very end of your .htaccess file, ensuring they are applied correctly without
interfering with WordPress’s own core rules.

### Key Features

#### Top and Bottom Blocks

Dedicated sections to add rules that appear before and after WordPress’s standard.
htaccess content.

#### Shell-Mode Syntax Highlighting

Makes writing and reviewing .htaccess rules easier with clear visual cues.

#### Auto-Expanding Editor

The editor automatically adjusts its height to fit your content, providing a comfortable
editing experience.

#### Automatic Backups

Every time you save new rules, a backup of your existing .htaccess file is automatically
created, providing a safety net.

#### Backup Restoration

Easily restore your .htaccess file from a list of the last 10 backups directly from
the plugin settings page.

#### Uninstall Options

Choose whether to delete .htaccess backups or keep them on your server when uninstalling
the plugin.

#### WordPress Filesystem API Integration

All file operations are performed using WordPress’s robust WP_Filesystem API, ensuring
compatibility and security across various hosting environments.

### Important Note

Modifying the .htaccess file incorrectly can lead to your website becoming inaccessible.
Always exercise caution and ensure you understand the rules you are adding. The 
backup feature is designed to help, but careful testing is always recommended.

## Capturas

 * [[
 * screenshot-1.png

## Instalación

Upload:

Download the plugin ZIP file from the WordPress.org plugin directory.

Go to your WordPress admin dashboard, navigate to Plugins > Add New.

Click on the «Upload Plugin» button at the top.

Choose the downloaded ZIP file and click «Install Now».

Activate:

Once installed, click «Activate Plugin».

Configure:

Go to Settings > Custom .htaccess in your WordPress admin menu.

Add your desired rules in the «Top of File» and «Bottom of File» text areas.

Click «Save Rules».

You can also manage backups and uninstall options from this page.

## FAQ

### What is the .htaccess file?

The .htaccess file is a powerful configuration file used by Apache web servers. 
It allows for decentralized management of web server configuration on a per-directory
basis, enabling features like URL rewriting, access control, password protection,
and more, without needing to modify the main server configuration.

### Why are there «Top of File» and «Bottom of File» sections?

WordPress automatically manages certain parts of your .htaccess file. Placing custom
rules at the very top or very bottom ensures they are processed either before WordPress’s
default rules (top) or after them (bottom), preventing conflicts and ensuring your
rules are applied as intended.

### What kind of rules can I add?

You can add various Apache directives, such as:

Redirections (Redirect, RewriteRule)

Blocking IP addresses or user agents

Setting custom error pages

Modifying caching headers

Disabling directory browsing

Enforcing HTTPS

And many more!

Always ensure the rules you add are valid Apache directives.

### What if I break my site?

The plugin creates a backup of your .htaccess file every time you save changes. 
If your site becomes inaccessible after saving rules, you can:

Access your site via FTP or your hosting’s file manager.

Navigate to your WordPress root directory and find the .htaccess file.

Go to wp-content/uploads/htaccess-backups/.

Download the most recent backup file (e.g., .htaccess-backup-YYYYMMDD-HHMMSS.bak).

Rename your current, problematic .htaccess file (e.g., to .htaccess_old).

Upload the backup file and rename it to .htaccess.

Alternatively, if you can still access your WordPress admin, go to Settings > Custom.
htaccess and use the «Restore Selected Backup» option.

### How many backups are kept?

The plugin keeps the last 10 backups of your .htaccess file. Older backups are automatically
discarded to save space.

### What happens to my backups when I uninstall the plugin?

On the Settings > Custom .htaccess page, there’s an «Uninstall Options» section 
where you can choose whether to «Delete all plugin data (including .htaccess backups)
upon uninstallation» or «Keep .htaccess backups on the server upon uninstallation.»
This gives you control over your data.

## Reseñas

No hay valoraciones para este plugin.

## Colaboradores y desarrolladores

«Custom .htaccess rules manager» es un software de código abierto. Las siguientes
personas han colaborado con este plugin.

Colaboradores

 *   [ Peter Duchnovsky ](https://profiles.wordpress.org/pdux/)

[Traduce «Custom .htaccess rules manager» a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/custom-htaccess-rules)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/custom-htaccess-rules/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/custom-htaccess-rules/)
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/custom-htaccess-rules/)
por [RSS](https://plugins.trac.wordpress.org/log/custom-htaccess-rules/?limit=100&mode=stop_on_copy&format=rss).

## Registro de cambios

#### 1.0.0

Initial release of the Custom .htaccess rules manager plugin.

Features include: Top and Bottom rule blocks, shell-mode syntax highlighting, auto-
expanding editor, automatic .htaccess backups, backup restoration, and uninstall
options.

Full integration with WordPress Filesystem API for secure file operations.

## Meta

 *  Versión **1.0.0**
 *  Última actualización **hace 9 meses**
 *  Instalaciones activas **Menos de 10**
 *  Versión de WordPress ** 5.0 o superior **
 *  Probado hasta **6.8.5**
 *  Versión de PHP ** 7.4 o superior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/custom-htaccess-rules/)
 * Etiquetas:
 * [backup](https://es.wordpress.org/plugins/tags/backup/)[editor](https://es.wordpress.org/plugins/tags/editor/)
   [htaccess](https://es.wordpress.org/plugins/tags/htaccess/)[security](https://es.wordpress.org/plugins/tags/security/)
 *  [Vista avanzada](https://es.wordpress.org/plugins/custom-htaccess-rules/advanced/)

## Valoraciones

Aún no se han enviado valoraciones.

[Your review](https://wordpress.org/support/plugin/custom-htaccess-rules/reviews/#new-post)

[Ver todas las valoraciones](https://wordpress.org/support/plugin/custom-htaccess-rules/reviews/)

## Colaboradores

 *   [ Peter Duchnovsky ](https://profiles.wordpress.org/pdux/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/custom-htaccess-rules/)