Title: PHP errorConstant WP_CACHE_KEY_SALT already defined
Last modified: September 8, 2021

---

# PHP errorConstant WP_CACHE_KEY_SALT already defined

 *  [Nick Porter](https://wordpress.org/support/users/nickporter2/)
 * (@nickporter2)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-errorconstant-wp_cache_key_salt-already-defined/)
 * I am getting a PHP error on all of my pages as I only have very basic knowledge
   I have no idea how to fix it. Any help much appreciated this is the error.
 * Constant WP_CACHE_KEY_SALT already defined
    wp-content/object-cache.php:19
 * Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-errorconstant-wp_cache_key_salt-already-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Roxy Kohilakis](https://wordpress.org/support/users/rkohilakis/)
 * (@rkohilakis)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-errorconstant-wp_cache_key_salt-already-defined/#post-14851915)
 * Hi [@nickporter2](https://wordpress.org/support/users/nickporter2/)! I would 
   recommend double-checking the syntax in your `wp-config.php`. Are you using `
   WP_CACHE_KEY_SALT` twice?
 *  Thread Starter [Nick Porter](https://wordpress.org/support/users/nickporter2/)
 * (@nickporter2)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-errorconstant-wp_cache_key_salt-already-defined/#post-14854152)
 * Thanks Roxy
    I also spoke to my hosting company and they replied with this which
   has fixed the problem.
 * Looks like the WP_CACHE_KEY_SALT was in fact already defined in wp-config.php
   and it wasn’t necessary in this case as we use our own version (it’s probably
   a leftover from the old hosting if the site has been migrated).
 * I’ve commented it out and you shouldn’t see any warnings about that anymore.
 *  [Roxy Kohilakis](https://wordpress.org/support/users/rkohilakis/)
 * (@rkohilakis)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-errorconstant-wp_cache_key_salt-already-defined/#post-14855389)
 * I’m so glad you were able to get it figured out 🙂

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

The topic ‘PHP errorConstant WP_CACHE_KEY_SALT already defined’ is closed to new
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Roxy Kohilakis](https://wordpress.org/support/users/rkohilakis/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/php-errorconstant-wp_cache_key_salt-already-defined/#post-14855389)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
