Title: PHP notice with CLI Maintenance Mode
Last modified: November 25, 2020

---

# PHP notice with CLI Maintenance Mode

 *  [naskar](https://wordpress.org/support/users/naskar/)
 * (@naskar)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-notice-with-cli-maintenance-mode/)
 * I’m writing a script to backup wordpress in FreeNas using Bash.
    When I issue
   the command `iocage exec wordpress "cd /usr/local/www/wordpress && su -m www -
   c 'wp maintenance-mode activate'"` I get these errors but wordpress is put in
   mantenance mode.
 *     ```
       PHP Notice:  Undefined index: HTTP_X_FORWARDED_PROTO in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 3
       PHP Notice:  Constant AUTH_KEY already defined in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 57
       PHP Notice:  Constant AUTH_SALT already defined in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 61
       Enabling Maintenance mode...
       Success: Activated Maintenance mode.
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Matthew](https://wordpress.org/support/users/atxmatt/)
 * (@atxmatt)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-notice-with-cli-maintenance-mode/#post-13718335)
 * Hi there,
 * This is due to the defines already being within the **wp-config.php**. You can
   try appending `--skip-plugins` and `--skip-themes` flags to the wp-cli command
   to have it not show up.
 * Kind regards!
 *  Thread Starter [naskar](https://wordpress.org/support/users/naskar/)
 * (@naskar)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-notice-with-cli-maintenance-mode/#post-13718508)
 * Still showing the errors
 *     ```
       root@wordpress:/usr/local/www/wordpress # php wp-cli.phar --skip-plugins --skip-themes maintenance-mode activate
       PHP Notice:  Undefined index: HTTP_X_FORWARDED_PROTO in phar:///usr/local/www/wordpress/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 3
       PHP Notice:  Constant AUTH_KEY already defined in phar:///usr/local/www/wordpress/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 57
       PHP Notice:  Constant AUTH_SALT already defined in phar:///usr/local/www/wordpress/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 61
       Enabling Maintenance mode...
       Success: Activated Maintenance mode.
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP notice with CLI Maintenance Mode’ is closed to new replies.

## Tags

 * [cli](https://wordpress.org/support/topic-tag/cli/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [naskar](https://wordpress.org/support/users/naskar/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/php-notice-with-cli-maintenance-mode/#post-13718508)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
