← All posts

How to Run a Public Paste Site Without a Dumping Ground

What to set in SnipShare before you open signups: the hourly rate limit, size and per-member caps, reporting, the moderation queue and a first-week watch list.

A public paste site stays useful if you set four things before the first stranger signs up: an hourly rate limit, a size and quantity cap, content reporting, and a named person who clears the moderation queue. SnipShare ships with sensible values for all of them, but the defaults were picked for a plugin that has to work on any site, not for yours. Ten minutes in settings now saves a cleanup weekend later.

Here is the operator’s view. For the member-facing story, with tags, collections and what a reporting button looks like from a reader’s seat, see the developer community post, which we won’t repeat here. What follows is about what you decide as the site owner, what each setting really does in the code, and what to look at during the first week.

Why open paste sites go bad

Nobody sets out to build a dumping ground, yet it happens in a predictable order. Signups open, a few real members post real snippets, and then the volume tools find it. Link farms and pasted spam start arriving in batches, along with the odd piece of code you’d rather not host, because a public page on a live domain is worth something to people who want an address to point at.

Two things stop most of this, and neither one is clever. Friction comes first: a person who has to hold an account, and who can only create so much per hour, costs a spammer more than an open form does. Attention comes second: someone on your side who sees what was flagged and acts on it within a day or two.

SnipShare gives you a lever for each. Because creating a paste needs a logged-in account, guests can read public pastes but can’t post. Speed is capped per account by a rate limit. A reporting button lets members flag what you haven’t seen, and a moderation screen turns those flags into a queue. Acting for you is the one thing the plugin doesn’t do, and we’ll come back to that because it shapes how you staff the thing.

One more WordPress-level point before the plugin settings. Account creation is a WordPress decision, not a SnipShare one. Where your site lets anyone register, check what role new accounts get in your WordPress settings, since the paste abilities follow ordinary WordPress capabilities.

What the plugin starts with

On a fresh install, the plugin writes these starting values, all editable under SnipShare, then Settings:

  • Default visibility for a new paste is public.
  • Default expiration is never.
  • Paste size tops out at 100,000 bytes, counted across all files in the paste.
  • Files per paste are capped at 10.
  • Pastes per member are set to 0, which means no limit.
  • Each member gets an hourly rate limit of 20.
  • Forking, collections, stars, tags, burn after reading, password protection and reporting are all switched on.

Read that list as a site owner and two lines jump out. With public by default, never-expire by default and no per-member total, a single account can fill the library with pastes that live forever, constrained only by the hourly rate. Twenty an hour adds up to 480 a day from one account, which is plenty for a person and generous for a script.

No value on that list is wrong for a small team site where you know everyone. Change them when strangers can join.

The hourly rate limit

You’ll find the rate limit on the Permissions tab, in a number field labelled Paste Rate Limit. The field accepts a whole number from 1 to 1,000 and means pastes per hour, per user. Out of the box it is 20.

In the code it behaves a little differently from what you might guess from the label:

  • Only creating counts. Both a new paste and a fork count. They go through the same check, so a member can’t dodge the limit by forking other people’s pastes.
  • The window is fixed. It starts at the member’s first creation and ends an hour later. Posting one paste every half hour never piles up against the limit, and after the hour ends the count resets.
  • Moderators are exempt. Whoever holds the moderate ability skips the rate limit and the per-member total. By default that ability follows the WordPress capability for moderating comments, so editors and administrators are exempt.
  • Over the limit returns a 429. The error code is rest_rate_limited, and the message tells the member they’ve created too many pastes recently and should wait.

That last point matters if members use the plugin through its REST API or any script built on it. Since a 429 is the standard “slow down” signal, a well-written client will back off. A badly written one will hammer the endpoint, and you’ll see that in your server logs rather than in SnipShare.

Who’s exempt can be changed by developers. The snipshare_limits_exempt filter receives the default answer and the user ID, so a site can exempt a trusted contributor group without giving them moderation powers.

Picking a number

One made-up example shows the trade-off. Say you run a tutorial site and a member wants to import twelve snippets from an old notes file. A limit of 5 lets five in, then a 429 on the sixth, and they come back after the window resets. Raise it to 20 and all twelve go through. Neither outcome is a disaster, though the first teaches the member that your site has a pace.

On a new public site, a limit between 5 and 10 is a reasonable opening position. Real members rarely create more than a handful of pastes in an hour, and a lower number leaves room to raise it for people who ask. Raising a limit after complaints makes for a friendlier conversation than lowering one after a spam burst.

Caps that stop one account from owning the library

Speed is what the rate limit controls. Total footprint is what the other limits control, and they live on the General tab under Paste Defaults.

The per-member total is Max Pastes Per User. Zero means unlimited. Set it above zero and any member who reaches the number gets a 403 with the code snipshare_paste_limit_reached and a message telling them to delete one first. Because it’s checked at the same moment as the rate limit, it applies to forks too. On an open community site, a number in the low hundreds is plenty for a genuine contributor and a ceiling for a bad actor. Moderators skip it.

Max Paste Size counts bytes across all files in a paste, after the change being made. Go over and the request fails with a 413 saying the paste is larger than the maximum for all files combined. At roughly a hundred kilobytes of text, the 100,000-byte default allows a very long source file. Most snippets are a fraction of that. For a community that shares snippets rather than whole programs, you can lower it and make log dumps and pasted databases a non-event.

Max Files Per Paste defaults to 10, since a paste with a dozen tabs is rarely a snippet anymore.

These three settings together decide what a bad day looks like. Under the defaults, one account can create 480 pastes in a day, each up to 100 KB, and nothing stops it from doing the same tomorrow. Add a per-member total and a lower size ceiling, and the same account hits a wall after a modest amount of storage.

The expiration and visibility defaults deserve a thought too. Want answers that stay findable? Leave public as the default. Closer to a team workbench? Set the default to unlisted or private and let people choose to publish. Our post on whether a paste site is safe for code explains what each level really exposes, and it’s worth sending to your members.

Reporting, and what a report does not do

Content reporting is on by default, under the Features section of the General tab. With it on, a logged-in member can report a paste they’re allowed to see. The reasons are fixed: spam, inappropriate, malicious, copyright or other, and the reporter can add a note. An unknown reason is stored as other.

Each member can report a given paste once, and a second attempt returns an error saying they’ve already reported it. That keeps one irritated member from filling your queue with the same complaint, and it means the number of reports against a paste is a count of different people.

Now the part to plan around. Reports don’t hide anything. No threshold exists at which a paste vanishes, however many people flag it. A reported paste stays exactly where it was, visible to everyone who could see it before, until a moderator acts. We found no auto-hide rule in the code.

Some will see that as a gap, but many owners prefer it, because automatic takedowns are an easy way for a small group to silence a post they dislike. It does change the staffing question, though. When a malicious paste arrives at night, it stays up until a person clears it. So the real setting you’re choosing isn’t in the plugin: it’s who watches the queue and how often.

The copyright reason works as a label for your queue and nothing more. Handling a copyright complaint is a matter for your own policy and the law where you operate, so decide that ahead of time rather than during the first one.

The moderation queue

Reports land under SnipShare, then Moderation. The menu item carries a count badge of pending reports, so you see the work waiting each time you open the admin. Three tabs split the screen: Pending, Reviewed and Dismissed. It opens on Pending.

Each report row shows the paste, the reporter, the reason and the actions. You get two buttons and one checkbox:

  • Mark Reviewed moves the report to the Reviewed tab.
  • Dismiss moves it to the Dismissed tab.
  • Trash paste is a checkbox you tick before you click either button.

The buttons and the checkbox are separate, so marking a report as reviewed doesn’t remove the paste. To get it gone, tick Trash paste first. That’s easy to forget in a hurry, so agree on a convention with your team. A workable one is that Reviewed means you acted and Dismissed means you looked and left it alone. Either way, the plugin records who made the decision and when, which leaves a trail if a member asks why their paste was removed.

By default the moderate ability maps to the WordPress capability for moderating comments, which means editors and administrators can open the screen. Sites that want a dedicated moderator role can remap it with the snipshare_ability_map filter, and there’s a table of every ability and its capability under the Permissions tab, so you can see the current mapping without reading code. Developers who want to hook in, for example to send a message to the team when a report comes in, can use the snipshare_paste_reported action, which fires with the report ID, the paste ID and the reporter’s ID.

The same screen, seen from the point of view of running a developer forum, appears in our community post. That post leaves the settings above to you.

Before you open signups

Run this list once, on a staging copy if you have one:

  1. Decide what role new accounts get in WordPress, and confirm it can create pastes but not moderate them.
  2. Set the rate limit, remembering that a single-digit number is a safe place to start.
  3. Choose a per-member total and a size ceiling that fit the sort of snippets you want.
  4. Confirm reporting is switched on, then file a test report from a non-admin account and watch it arrive.
  5. Name at least one person who clears the queue, and a backup for when they’re away.
  6. Write two paragraphs of policy: what doesn’t belong (secrets, personal data, harmful code, spam) and what happens when something is reported. Link it from wherever members sign up.
  7. Pick a default visibility on purpose rather than leaving it where the installer put it.

People skip the test report in step 4. File it as an ordinary member, find it in the Pending tab, mark it reviewed, and confirm the badge count drops. Two minutes is all it takes, and it tells you the whole chain works on your theme and your role setup.

Planning to let members embed pastes on your own pages? The embedding guide explains what readers see when a paste is private, expired or removed. That matters here too, because a trashed paste no longer resolves through the embed route.

The first week

A dashboard isn’t needed here, only a short routine and a few questions.

Day one. Open the Moderation screen twice. Once at the start and once at the end of the day, so you know the badge works and the first reports, if any, are what you expected. Most likely there will be none, and that’s fine.

Day two to four. Look at the public pastes listing yourself, as a visitor would. Is what’s there what you meant the site to be about? A listing gives you the quickest read on whether the tone of the first posts has matched your policy. Because early members copy early content, the first twenty public pastes set the culture more than any policy page does.

Watch for tag drift too, which is a quality problem rather than an abuse one. Tags are shared across the site, and members will write js and javascript as different tags. Pick your names early and tidy as you go, as the community post suggests.

Day five to seven. Read the reports as a group, not one at a time. What the mix of reasons tells you matters. A cluster of spam reports from different people means the front door needs tightening, so lower the rate limit or the per-member total. Scattered other reports with notes tell you your policy has a gap. A single member filing several reports on a rival’s pastes tells you the tool is being used as a weapon, and you may want to talk to them.

Ask members too. Should anyone tell you they hit a 429, ask what they were doing. Hitting the limit as a real contributor is the strongest argument for raising it. Hitting it as a script is a reason to leave it where it is.

At the end of week one, adjust one setting at a time. Change the rate limit, the size cap and the visibility default together and you won’t know which one fixed what.

What this setup gives you

Defaults with no owner send a paste site drifting toward noise. One with a modest rate limit, a size ceiling, reporting switched on and a person who clears the queue stays a place people want to link to. Nothing in it is sophisticated, and that’s the point: every control here is a number in a settings field or a checkbox on a report row, and the whole routine fits in a few minutes a day.

Still weighing whether to host this yourself? The code snippet sharing page shows what a self-run snippet library looks like in practice. And when you’re moving over from your current platform, the setup above is worth doing before you import anything, not after.