---
layout: default
title: WP_CLI\Utils\get_temp_dir()
description: "Get the system's temp directory. Warns user if it isn't writable."
---

<small><a href="/docs/">Docs</a> &raquo; <a href="/docs/internal-api/">Internal API</a> &raquo; System</small>

## WP_CLI\Utils\get_temp_dir()

Get the system's temp directory. Warns user if it isn't writable.

***

### Usage

    WP_CLI\Utils\get_temp_dir()

<div>
<strong>@return</strong> (string) <br />
</div>


*Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.*


***

### Related

<ul>



<li><strong><a href="/docs/internal-api/wp-cli-get-php-binary/">WP_CLI::get_php_binary()</a></strong> - Get the path to the PHP binary used when executing WP-CLI.</li>



</ul>


