Title: is_lighttpd_before_150
Published: April 25, 2014
Last modified: May 20, 2026

---

# is_lighttpd_before_150(): bool

## In this article

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

[ Back to top](https://developer.wordpress.org/reference/functions/is_lighttpd_before_150/?output_format=md#wp--skip-link--target)

Determines whether the server is running an earlier than 1.5.0 version of lighttpd.

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

 bool Whether the server is running lighttpd < 1.5.0.

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

    ```php
    function is_lighttpd_before_150() {
    	$server_parts    = explode( '/', $_SERVER['SERVER_SOFTWARE'] ?? '' );
    	$server_parts[1] = $server_parts[1] ?? '';

    	return ( 'lighttpd' === $server_parts[0] && -1 === version_compare( $server_parts[1], '1.5.0' ) );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/functions.php#L6180)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/functions.php#L6180-L6185)

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

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

## User Contributed Notes

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