BLACK FRIDAY
Save 59% on PageForge Annual $191/year $485/year
Claim 59% Off →
If File Exists icon
Slowing down Tested up to 6.8.11 #13 in coffee2code

If File Exists

This plugin provides the functions c2c_if_file_exists(), c2c_if_theme_file_exists(), c2c_if_plugin_file_exists() that check if a file exists and either return true/false or display a string containing information about…

Active installs30+10+ tier
Downloads · 30d202▲ +9.8% vs prev. 30d
Rating5/51 reviews
Health score40/100At risk
All-time downloads13.6KSince Jun 2009
Support resolved—No recent threads
RequiresWP 2.7PHP any
Downloads · 7d50▲ +13.6% week over week
Our verdict

Consider an alternative

If File Exists shows warning signs in 2026 — compare the alternatives below before installing. It runs on 30+ sites, is rated 5/5 and was last updated 2 years ago, and scores 40/100 on our health check.

  • Small user base (30+ active installs)
  • Very few reviews so far
  • No update in over a year
  • Only tested up to WordPress 6.8 (latest is 7.1)

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

4812Jul 23Sep 5Oct 20
Yesterday4
Daily average (1y)5
Peak day18Dec 10, 2025
Last 12 months1.8K

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where If File Exists stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
coffee2code #11 65 Best coffee2code plugins →
existence #21 394 Best existence plugins →
exists #14 5,793 Best exists plugins →
file >100 10,000 Best file plugins →
filesystem #36 868 Best filesystem plugins →

Version adoption

Share of active sites per release.

  • 2.258.1%
  • 2.441.9%

Rating breakdown

★★★★★★★★★★ 5 from 1 reviews

  • 5★100.0%
  • 4★0.00%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About If File Exists

From the official readme · v2.4

Description

This plugin provides the functions c2c_if_file_exists(), c2c_if_theme_file_exists(), c2c_if_plugin_file_exists() that check if a file exists and either return true/false or display a string containing information about the file.

  • If a format string is not passed to it, the functions returns a simple boolean (true or false) indicating if the specified file exists.
  • Otherwise, the format string provided to it will be used to construct a response string, which can be customized to display information about the file (such as directory, extension, name, path, size, or url). If the $echo argument is true, that string is displayed on the page. Regardless of the value of $echo, the response string is returned by the function.

By default, c2c_if_file_exists() assumes you are looking for the file relative to the default WordPress upload directory. If you wish to search another directory, specify it as the $dir argument. c2c_if_theme_file_exists() assumes you are looking for a file relative to the currently active theme’s home directory. c2c_if_plugin_file_exists() assumes you are looking for a file relative to the directory that contains WordPress plugins.

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Developer Documentation

Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the template tags and hooks provided by the plugin.

As an overview, these are the template tags provided by the plugin:

  • c2c_if_file_exists() : Checks if a file exists and returns true/false or displays a string containing information about the file.
  • c2c_if_plugin_file_exists() : Checks if a file exists (relative to the plugins directory) and returns true/false or displays a string containing information about the file.
  • c2c_if_theme_file_exists() : Checks if a file exists (relative to the current theme’s directory) and returns true/false or displays a string containing information about the file. If the current theme is a child theme, then the function will check if the file exists first in the child theme’s directory, and if not there, then it will check the parent theme’s directory.

These are the hooks provided by the plugin:

  • c2c_if_file_exists : Filter that allows use of an alternative approach to safely invoke c2c_if_file_exists() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.
  • c2c_if_plugin_file_exists : Filter that allows use of an alternative approach to safely invoke c2c_if_plugin_file_exists() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.
  • c2c_if_theme_file_exists : Filter that allows use of an alternative approach to safely invoke c2c_if_theme_file_exists() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.

Installation

  1. Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically /wp-content/plugins/).
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. In one or more of your templates, utilize one of the template tags provided by this plugin (see examples)

Changelog

Minor update: added '%file_size%' and '%file_size_bytes%' substitution tags, escaped output before display to prevent unsafe markup, noted compatibility through WP 6.8+ and PHP 8.3+, and updated copyright date (2025)

2.4 (2025-04-18)

  • New: Add ‘%file_size%’ and ‘%file_size_bytes%’ as additional substitution tags
  • Change: Escape $format and $show_if_not_exists values prior to display to omit unsafe markup
  • Change: Discontinue unnecessary explicit loading of textdomain
  • Change: Note compatibility through WP 6.8+
  • Change: Note compatibility through PHP 8.3+
  • Change: Update copyright date (2025)
  • Unit tests:
    • Change: Change test class name to match plugin name

2.3.2 (2024-08-02)

  • Change: Note compatibility through WP 6.6+
  • Change: Update copyright date (2024)
  • New: Add .gitignore file
  • Change: Remove development and testing-related files from release packaging
  • Unit tests:
    • Hardening: Prevent direct web access to bootstrap.php
    • Allow tests to run against current versions of WordPress
    • New: Add composer.json for PHPUnit Polyfill dependency
    • Change: In bootstrap, store path to plugin directory in a constant

2.3.1 (2023-05-18)

  • Change: Note compatibility through WP 6.3+
  • Change: Update copyright date (2023)
  • New: Add a potential TODO item

Full changelog is available in CHANGELOG.md.

Full changelog on WordPress.org →

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.

Active installs badge Rating badge Health score badge

Best If File Exists alternatives

All coffee2code plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 Disable Search Disable Search Disable the built-in front-end search capabilities of WordPress. by Scott Reilly 30K+ ★★★★★★★★★★ 4.7 (16) 2 years ago 51
2 Configure SMTP Configure SMTP Configure SMTP mailing in WordPress, including support for sending email via SSL/TLS (such… by Scott Reilly 6K+ ★★★★★★★★★★ 4.9 (45) 2 years ago 46
3 One Click Close Comments One Click Close Comments Conveniently close or open comments for a post or page with one click from the admin… by Scott Reilly 5K+ ★★★★★★★★★★ 4.9 (10) 2 years ago 50
4 Text Replace Text Replace Replace text with other text. Handy for creating shortcuts to common, lengthy, or… by Scott Reilly 3K+ ★★★★★★★★★★ 4.4 (18) 5 years ago 38
5 Duplicate Widget Duplicate Widget A widget that can act as a duplicate of another widget (for synchronized use in another… by Scott Reilly 1K+ ★★★★★★★★★★ 4.3 (12) 9 years ago 36
6 Force Admin Color Scheme Force Admin Color Scheme Force a single admin color scheme for all users of the site. by Scott Reilly 500+ ★★★★★★★★★★ 5 (2) 2 years ago 43
7 Single Category Permalink Single Category Permalink Reduce permalinks (category or post) that include entire hierarchy of categories to just… by Scott Reilly 400+ ★★★★★★★★★★ 5 (5) 5 years ago 39
8 Hide Broken Shortcodes Hide Broken Shortcodes Prevent broken shortcodes from appearing in posts and pages. by Scott Reilly 400+ ★★★★★★★★★★ 4.5 (10) 6 months ago 58
9 Years Ago Today Years Ago Today Lists posts published to your site on this day in previous years via admin dashboard… by Scott Reilly 100+ ★★★★★★★★★★ 5 (6) 5 months ago 65
10 Disable Directory Listings Disable Directory Listings Prevent virtual directory listing services from listing the contents of directories, and/or… by Scott Reilly 100+ ★★★★★★★★★★ 5 (1) 15 years ago 32

FAQ

If File Exists: quick answers

Straight answers, pulled from live WordPress.org data.

Live data from WordPress.org · checked Oct 21, 2026

Is If File Exists free?

Yes. If File Exists is free to download and use from the official WordPress.org plugin directory.

Is If File Exists safe to use in 2026?

If File Exists shows warning signs in 2026 — compare the alternatives below before installing. It runs on 30+ sites, is rated 5/5 and was last updated 2 years ago, and scores 40/100 on our health check.

How many websites use If File Exists?

If File Exists is active on 30+ WordPress websites and has been downloaded 13,560 times since it launched in June 2009. It was downloaded 202 times in the last 30 days.

Does If File Exists work with WordPress 7.1?

If File Exists is officially tested up to WordPress 6.8.11, while the latest release is 7.1.3. It may still work, but try it on a staging site first.

When was If File Exists last updated?

The latest version, 2.4, was released on April 18, 2025 (2 years ago).

Who makes If File Exists?

If File Exists is developed and maintained by Scott Reilly.

What are the best alternatives to If File Exists?

The most popular alternatives to If File Exists are Disable Search (30K+ installs), Configure SMTP (6K+ installs) and One Click Close Comments (5K+ installs).

Powered by PageForge

Want thousands of pages that rank like these? Build them in an afternoon.

This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.

  • CSV, Google Sheets & API data sources
  • AI content, schema & internal links per page
  • Works with Elementor, Gutenberg, Yoast & Rank Math
  • Free on WordPress.org — no credit card
Sarah is here to help!
Hi there! 👋 Need help finding what you're looking for?
Sarah
Sarah
Online & Ready to Help
Hi there! 👋 Need help finding what you're looking for?

We'll use this to continue our conversation

Just now ✓ Verified

Join 500+ SEO Pros Scaling Their Strategy

Get exclusive programmatic SEO tactics, AI content workflows, and the latest PageForge updates delivered straight to your inbox. Stay ahead of the algorithm.

We care about your data in our privacy policy.