Word Replacement Plugin for WordPress
Welcome to the official homepage of the Word Replacement/Profanities protection plugin for WordPress by Peter Hengl.
The Word Replacement/Profanities Protection Plugin for WordPress replaces words or phrases in your commenters' comments with other words or phrases that YOU select. It can be used to replace profanities with harmless words, but it was originally made and intended to replace harmless words with profanities - which is much more fun.
- Download the following file: profanities.zip
- Unpack the contained "profanities.php" file and copy it into your wp-content/plugins directory.
- Activate the Word replacement plugin on the plugin page of your WordPress administration panel.
- In your administration panel, a new administration page "Word Replacement" will be added as a part of the "Options" section. Go to Options->Word Replacement and configure your Word Replacement plugin according to the configuration instructions below.
- when you first enter the configuration page of your plugin (Options->Word Replacement), there will only be one text field. Into this text field, fill a path to your future word replacement file. Enter the (absolute) path to your future word replacement file, for instance "/var/www/html/blog/myprofanities.txt" Or "/home/sites/www/myreplacements". Be sure to give an absolute path, otherwise the plugin won't work. Also check out the notes about the word replacement file path below.
- Once you have saved the path, a big text field will appear. The text field contains the content of your replacement file. Specify your replacements here, in the format provided below.
Replacement file format
The format of the replacement file is quite simple: one replacement per line, in the format
In the above example, each occurrence of the word "word" in your comments will be replaced by the word "replacement".
Let us assume that you do not want your users to use the word "cocksucker", as it is a very nasty word that shouldn't be used by good christian people. So you might want to define the following replacement:
because "dicksmoker" is a much better word. Some other nasty words you might want to remove from your blog comments: pussy, penis, fucker, asslicking cunt, arsehole, shite, bollocks, kitten, wanker, anus, fuckhead, shithead, dickhead, pussyhead, asshead, penishead, givehead, and so on.
You can use empty lines to make your replacement file more readable:
cock=>Cock-a-doodle penis=>wee-wee dick=>cheney pussy=>kitten vagina=>vagina cunt=>the good place
Please notice the following peculiarities of the word replacement plugin:
- The wr plugin is case-sensitive. This means that if your replacement is
cock=>sock, the words
Cock, COCK, cOckwon't be replaced.
- The wr plugin doesn't check whether your word is a full word. Again, if your replacement is
sockroach. On the positive Side,
socks. Hooray for socks. There is a small workaround for this, in case you don't want any socksmokers on your blog: you can add leading and trailing spaces to your replacement:
cock => sockwill guaranteedly not work on
- As the previous example demonstrates, you can also use spaces in your replacements, thus allowing
phrases or whole sentences in your replacements:
Joe=>Joe, the big fat arsewhole
- Equally, you can remove or add html code, complete web pages, introduce html entities and so on. The only thing you cannot replace is the => sign.
- The replacement plugin does only affect the comment text, but not the comment e-mail, username, web page adress or what else.
Very important notice
The wr plugin doesn't actually change your database. It replaces the words in comments before they are passed to your users. This has a number of interesting and useful (but also dangerous) results:
- If you add or remove a replacement, this also has an effect on all old comments.
- The replacement function is called for every single comment every single time someone takes a look at the comment. This means: if you define a lot of replacements and/or you have a lot of users, it might slow down your server considerably. Use with care.
- The replacement also affects the comments page in the administration panel, under the same conditions as on your regular blog page.
Notes about the word replacement file path
You're probably wondering about why you have to manually set the path to a word replacement file. Well, here's some interesting details:
- If you set the path to an existing file (i.e. a downloaded word replacement file), that file will be used. The content will be displayed in the word replacements field.
- If you enter a path to a non-existing file, a new file will be created.
- If you already have a path set, and then re-set it to a new location, your old file will of course not be deleted. This allows you to keep and regularly exchange multiple word replacement files. You might, for instance, keep multiple seasonal files: christmas.txt might contain "blowjob=>christmas present", thanksgiving.txt might contain "blowjob=>gobble,gobble".
- Remember: the file paths need to be absolute! (God knows why. I don't.) If you don't know the absolute path to the directory where your files are kept, contact your provider's administrator.
First of all, I strongly discourage using the plugin for actually replacing profanities by nice words. Swear words are an important and integral part of human expressivity. Encourage them. They are good. If you want to remove swear words from your blog, you are probably a fundamentalist conservative and thus A BAD PERSON.
Apart from replacing swear words, there are however a million funny things that can be done with the word replacement plugin. Get some suggestions below:
Replace nice words with swear words
Why not replace regular words by nasty words? Check your commenters' vocabulary for often-used words and put them into your word replacement file. On an IT related blog, words you might want to replace are
PC=>Porn Collector Linux=>lick-ux cable=>penis plug=>vagina OS=>OS so sexy GUI=>goo
I guarantee with my life that this is very funny. Really. Funny. You will laugh. Like this: haha!
Use word replacements to enforce an agenda
Windows=>Winsucks Mac=>gay computer Linux=>Linux (which RULZORZZZ!!)
Again, this is very funny. Your commenters will laugh very much.
Invert what they are saying
Get personal: insult your frequent commenters
If you have some people who regularly comment on your blog, you might use their names for insulting replacements, so that when other commenters want to reply to them, it will look like they insulted them. Very funny! Remember, it is much funnier to laugh about other people than it is to laugh about yourself!
Joe=>Joe, you suck! Fred=>Fred, you suck COCK!
Make Spam funny
Spam is an annoying reality - if a spam comment manages to slip through akismet or if you want to have some fun when clearing your akismet spam list, replace some spam-typical words:
Viagra=>funny penis pill penis enlargement=>wee-wee biggie operation
Mess with the spelling
Want your blog commenters to go crazy about their spelling? Replace some common words by funny spelling errors. The eternal classic: " the => teh ". Very funny.
Mess with the layout
Want to make sure your blog layout gets destroyed? Either use <div>s in your WordPress theme, or use the word replacements:
hello=>helloooooooooooooooooooooooooooooooooooooooooooooooooo the=><p><marquee><blink>the</blink></marquee></p> Windows=><img src="windows-logo.gif" width="10000" height="10000">Windows Linux=><span style="background-color:very ugly pink;">Linux</span>
But of course, nothing is more funny than your own, personalised insults and fuck-ups for your blog. Try them out, have a ball, send them to me. If you send me a link to your profanities file, I will put it online so that the whole world can have a fun, healthy laugh. Hooray!
Well, well, copyright. Whatever. This is open source, do whatever you want with it. Remember: it was I (Peter F. Hengl I., Ruler of several important galaxies, destroyer of childhood dreams, crusher of weak souls, creator of the word replacement/profanities protection plugin for WordPress) who unleashed all the horrors of the replacement plugin at your blog.
You might, however, consider sending any questions, suggestions, modifications, or else to me, so that I might include them into the plugin. Lazy bastard that I am I probably will not include them. My e-mail adress is
The above spam-protected image containing my e-mail adress is very simple to interpret: read according to the arrows, then reverse, then replace "dot" by "." and "(AT)" by "@" - very easy! Take that, stupid spammers!
Finally, you might want to visit my own (german language) film-related blog, with working, funny word replacement plugin installed.