Title: Setting credentials in PHP
Last modified: June 29, 2018

---

# Setting credentials in PHP

 *  [DevelopMen](https://wordpress.org/support/users/developmen/)
 * (@developmen)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/setting-credentials-in-php/)
 * Hello,
 * Sorry if this is answered before, but nowhere in the docs, guides or Google search
   could I find this. Is it possible to set the login credentials (username + password)
   for basic authentication in PHP by, for example, using a define? I don’t feel
   comfortable storing them in the database.
 * Thanks.

The topic ‘Setting credentials in PHP’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [DevelopMen](https://wordpress.org/support/users/developmen/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/setting-credentials-in-php/)
 * Status: not resolved