PHPackages                             devgeniem/wp-sanitize-accented-uploads - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. devgeniem/wp-sanitize-accented-uploads

ActiveWordpress-muplugin

devgeniem/wp-sanitize-accented-uploads
======================================

Replaces accents from future uploads and has wp-cli command which you can use to sanitize current content.

1.2.1(9y ago)2798.4k↑15.8%6[3 issues](https://github.com/devgeniem/wp-sanitize-accented-uploads/issues)[2 PRs](https://github.com/devgeniem/wp-sanitize-accented-uploads/pulls)5MITPHPPHP &gt;=5.6

Since Mar 1Pushed 7y ago9 watchersCompare

[ Source](https://github.com/devgeniem/wp-sanitize-accented-uploads)[ Packagist](https://packagist.org/packages/devgeniem/wp-sanitize-accented-uploads)[ Docs](http://geniem.com)[ RSS](/packages/devgeniem-wp-sanitize-accented-uploads/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (15)Used By (5)

[![geniem-github-banner](https://cloud.githubusercontent.com/assets/5691777/14319886/9ae46166-fc1b-11e5-9630-d60aa3dc4f9e.png)](https://cloud.githubusercontent.com/assets/5691777/14319886/9ae46166-fc1b-11e5-9630-d60aa3dc4f9e.png)

WP Plugin: Sanitize Accented Uploads
====================================

[](#wp-plugin-sanitize-accented-uploads)

[![Build Status](https://camo.githubusercontent.com/f874bccbd5cbb3781dadbcfdf7bb4bd0388ae093cbef2df1bf99e704d164fd8c/68747470733a2f2f7472617669732d63692e6f72672f64657667656e69656d2f77702d73616e6974697a652d616363656e7465642d75706c6f6164732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/devgeniem/wp-sanitize-accented-uploads) [![Latest Stable Version](https://camo.githubusercontent.com/3f90004b3680b7beb2c7846aeeec82f1baed94158d626d5d405f65f04b901d41/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d73616e6974697a652d616363656e7465642d75706c6f6164732f762f737461626c65)](https://packagist.org/packages/devgeniem/wp-sanitize-accented-uploads) [![Total Downloads](https://camo.githubusercontent.com/f62b0983ea36ba9e3e3cca24576e0d52c1b42cbb8380a8e6183b7c1a22b08595/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d73616e6974697a652d616363656e7465642d75706c6f6164732f646f776e6c6f616473)](https://packagist.org/packages/devgeniem/wp-sanitize-accented-uploads) [![Latest Unstable Version](https://camo.githubusercontent.com/c8152e7a254d5123f77b46c7f63950095d9d6ac9d73483e81ba253584468e8b2/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d73616e6974697a652d616363656e7465642d75706c6f6164732f762f756e737461626c65)](https://packagist.org/packages/devgeniem/wp-sanitize-accented-uploads) [![License](https://camo.githubusercontent.com/a6280a0e108f781a509d8836f10044c9a7138263d8aebeb1d5929cbe73b5b140/68747470733a2f2f706f7365722e707567782e6f72672f64657667656e69656d2f77702d73616e6974697a652d616363656e7465642d75706c6f6164732f6c6963656e7365)](https://packagist.org/packages/devgeniem/wp-sanitize-accented-uploads)

WordPress plugin which removes accented characters like `åöä` from future uploads and has easy wp-cli command for removing accents from current uploads and attachment links from database. This helps tremendously with current and future migrations of your site and helps you to avoid strange filename encoding bugs. It also turns spaces into dashes `' ' => '-'` and removes any other special characters like `™ ¼` so that they don't bother you anymore.

Sanitize accents from Cyrillic, German, French, Polish, Spanish, Hungarian, Czech, Greek, Swedish. This even removes rare but possible unicode NFD characters from files by using [PHP Normalizer class](http://php.net/manual/en/normalizer.normalize.php). These usually happen if you have mounted uploads into your vagrant box in OS-X.

This plugin even tries to fix your files which are already corrupted. For example you can fix situations where you might have uploaded file `ääkkönen.png` which has corrupted into `Ã¤Ã¤kkÃ¶nen.png`. See more in last section. These encoding errors are taken from .

This plugin and wp-cli command are WordPress multisite compatible.

Installation
------------

[](#installation)

### Composer

[](#composer)

Install with composer by running:

```
$ composer require devgeniem/wp-sanitize-accented-uploads

```

OR add it into your `composer.json`:

```
{
  "require": {
    "devgeniem/sanitize-accented-uploads": "*"
  },
  "extra": {
    "installer-paths": {
      "htdocs/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"]
    }
  }
}
```

It installs as mu-plugin so that your clients won't accidentally disable it.

### Wordpress.org

[](#wordpressorg)

You can also download the plugin from wordpress.org:

Contributing
------------

[](#contributing)

Contributions are welcome! If you add new functionality remember to add new unit tests too.

Use WP CLI to remove accents from uploads and database
------------------------------------------------------

[](#use-wp-cli-to-remove-accents-from-uploads-and-database)

This searches for accented filenames in all of your attachments. If it founds any it looks if these attachments are used in post content and sanitizes all occurences of the the attachment filename path from wp\_posts and wp\_postmeta.

Take backup from your files and database before running this. It works for us but we can't give any guarantees.

```
# You can analyze before running it:
$ wp sanitize all --verbose --dry-run

# When you are sure go ahead and run it
$ wp sanitize all

# If you have a network you can do network wide replace
$ wp sanitize all --network

```

### Example output

[](#example-output)

```
$ wp sanitize all
Found: 5 attachments.
This may take a while...
REPLACING: ääkkönen.png ---> aakkonen.png
----> Checking image:     /var/www/wp/wp-content/uploads/2016/04/ääkkönen.png
----> Replaced file:      Ã¤Ã¤kkÃ¶nen.png -> aakkonen.png
----> Checking thumbnail: /var/www/wp/wp-content/uploads/2016/04/ääkkönen-150x68.png
----> Replaced thumbnail: Ã¤Ã¤kkÃ¶nen-150x68.png -> aakkonen-150x68.png

Remaining workload: 2 attachments...

Success: Replaced 1 from 5 attachments.

```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~68 days

Total

14

Last Release

3411d ago

Major Versions

0.2 → 1.02016-03-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5691777?v=4)[Onni Hakala](/maintainers/onnimonni)[@onnimonni](https://github.com/onnimonni)

![](https://avatars.githubusercontent.com/u/11960000?v=4)[Hion Digital Oy](/maintainers/devgeniem)[@devgeniem](https://github.com/devgeniem)

---

Top Contributors

[![onnimonni](https://avatars.githubusercontent.com/u/5691777?v=4)](https://github.com/onnimonni "onnimonni (43 commits)")[![jeremyzahner](https://avatars.githubusercontent.com/u/1925488?v=4)](https://github.com/jeremyzahner "jeremyzahner (1 commits)")[![rhurling](https://avatars.githubusercontent.com/u/840655?v=4)](https://github.com/rhurling "rhurling (1 commits)")

---

Tags

wordpresswpEscapeurlsuploadsaccentssanitate

### Embed Badge

![Health badge](/badges/devgeniem-wp-sanitize-accented-uploads/health.svg)

```
[![Health](https://phpackages.com/badges/devgeniem-wp-sanitize-accented-uploads/health.svg)](https://phpackages.com/packages/devgeniem-wp-sanitize-accented-uploads)
```

###  Alternatives

[roots/bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure

6.5k441.8k2](/packages/roots-bedrock)[airesvsg/acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API

1.4k75.0k](/packages/airesvsg-acf-to-rest-api)[wecodemore/wpstarter

Composer plugin to easily build WordPress websites entirely managed via Composer.

253195.2k6](/packages/wecodemore-wpstarter)[wp-pay-extensions/gravityforms

Gravity Forms driver for the WordPress payment processing library.

1133.3k2](/packages/wp-pay-extensions-gravityforms)[nekojira/wp-api-menus

Extends WordPress WP API with menu routes.

1401.5k](/packages/nekojira-wp-api-menus)[devgeniem/wp-geniem-roles

Wrapper class for WordPress role creation and manipulation.

1857.0k](/packages/devgeniem-wp-geniem-roles)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
