• Resolved Alwin

    (@wp-opti)


    I used the code you describe here to protect my SMTP username and password in wp-config:
    https://postmansmtp.com/post-smtp-1-9-0-better-support-for-secure-delivery/

    If I use the code like this in my wp-config:

    <?php
    define( ‘POST_SMTP_AUTH_USERNAME’, ‘[email protected]’);
    define( ‘POST_SMTP_AUTH_PASSWORD’, ‘MY_GMAIL_PASS’);

    my website crashes.

    If I use the code without <?php in the first line, then the website is good again.
    So do i have to use the code like this (without the <?php line):

    define( ‘POST_SMTP_AUTH_USERNAME’, ‘[email protected]’);
    define( ‘POST_SMTP_AUTH_PASSWORD’, ‘MY_GMAIL_PASS’);

    Second question: in the post you say that “In the wizard or the settings just insert fake info”. So in the wizard password field I entered 123456 as a fake password. After saving this change I see that the normal password is back in the settings? I mean I see 22 characters after saving and my real password is 22 characters…

Viewing 6 replies - 16 through 21 (of 21 total)
  • yehudah

    (@yehudah)

    Did you type the password in the file or paste it?

    Thread Starter Alwin

    (@wp-opti)

    I typed it

    Thread Starter Alwin

    (@wp-opti)

    I do have this code in my .htaccess file:

    # protect wpconfig.php
    <files wp-config.php>
    order allow,deny
    deny from all
    </files>

    Maybe that’s the problem??

    Thread Starter Alwin

    (@wp-opti)

    I think I solved the problem now!

    The code in my wp-config was placed at the bottom of the file, so beneath the line

    /* That’s all, stop editing! Happy publishing. */

    Now I have added the code above this line and everything is working good now!

    Does this sound logical to you?

    yehudah

    (@yehudah)

    ??

    Yep, my bad.
    Very good you noticed.

    Thread Starter Alwin

    (@wp-opti)

    No problem, I have learned something new and important about the wp-config file now ??

    Thank you for all your support!

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘smtp password in wp-config?’ is closed to new replies.