Title: API key store location
Last modified: June 25, 2025

---

# API key store location

 *  Resolved [elisah9](https://wordpress.org/support/users/elisah9/)
 * (@elisah9)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/api-key-store-location/)
 * I’ve noticed that some plugins offer an option to let users choose where to store
   their API keys – either in the `wp-config.php` file or in the database.
 * However, it seems that **WP Mail SMTP** does not provide such an option.
   So, 
   where exactly are the API keys stored when using WP Mail SMTP?

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

 *  Plugin Support [Darshana](https://wordpress.org/support/users/darshanaw/)
 * (@darshanaw)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/api-key-store-location/#post-18536933)
 * Hi [@elisah9](https://wordpress.org/support/users/elisah9/),
 * Thanks for reaching out! You can use WP Mail SMTP constants to set your credentials
   within your `wp-config.php` file.
 * To do that, please review [this](https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/)
   guide.
 * I hope this helps. Thanks!
 *  Thread Starter [elisah9](https://wordpress.org/support/users/elisah9/)
 * (@elisah9)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/api-key-store-location/#post-18537622)
 * Thank you for your reply.
 * However, my question is: by default, where does WP Mail SMTP store the API keys?
 *  Plugin Support [Darshana](https://wordpress.org/support/users/darshanaw/)
 * (@darshanaw)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/api-key-store-location/#post-18548054)
 * Hi [@elisah9](https://wordpress.org/support/users/elisah9/),
   Thank you for your
   follow-up question. By default, WP Mail SMTP stores API keys in your site’s database.
 * You can find them in the `wp_options` table under the option name `wp_mail_smtp`.
   If you’ve set constants in the `wp-config.php` file, those values will override
   the database settings.
 * If you have any other questions, please feel free to let me know. Thank you!

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

The topic ‘API key store location’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Darshana](https://wordpress.org/support/users/darshanaw/)
 * Last activity: [11 months, 1 week ago](https://wordpress.org/support/topic/api-key-store-location/#post-18548054)
 * Status: resolved