Title: get_real_file_to_edit
Published: April 25, 2014
Last modified: August 20, 2026

---

# get_real_file_to_edit( string $file ): string

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#changelog)

This function has been deprecated since 2.9.0.

Get the real filesystem path to a file to edit within the admin.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#parameters)󠁿

 `$file`stringrequired

Filesystem path relative to the wp-content directory.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#return)󠁿

 string Full filesystem path to edit.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#source)󠁿

    ```php
    function get_real_file_to_edit( $file ) {
    	_deprecated_function( __FUNCTION__, '2.9.0' );

    	return WP_CONTENT_DIR . $file;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/deprecated.php#L117)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/deprecated.php#L117-L121)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#related)󠁿

| Uses | Description | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/get_real_file_to_edit/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Deprecated.  | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_real_file_to_edit%2F)
before being able to contribute a note or feedback.