Settings in wp-config.php require saving before working
-
We have a number of options hard coded in the
wp-config.php
file on our install, as we are using a multisite / network install of WordPress, and want to use the same settings for all sites.Looking through the code for the plugin, we found the following list of options:
https://github.com/awesomemotive/WP-Mail-SMTP/blob/master/src/Options.php#L446-L514
We then set up the following options in
wp-config.php
:/* WP-MAIL SMTP settings */ define( 'WPMS_ON', true ); /* Mail Settings */ define( 'WPMS_MAIL_FROM', '[email protected]' ); define( 'WPMS_MAIL_FROM_NAME', 'Some Website Email' ); define( 'WPMS_MAILER', 'smtp' ); define( 'WPMS_SET_RETURN_PATH', 'true' ); /* SMTP settings */ define( 'WPMS_SMTP_HOST', 'smtp.gmail.com' ); define( 'WPMS_SSL', 'ssl' ); define( 'WPMS_SMTP_PORT', 465 ); define( 'WPMS_SMTP_AUTOTLS', 1 ); define( 'WPMS_SMTP_AUTH', 1 ); define( 'WPMS_SMTP_USER', '[email protected]' ); define( 'WPMS_SMTP_PASS', 'somepassword' );
We created a fresh site and activated the WP Mail SMTP plugin. However, we attempted to send a test email, and got an error message stating that our settings were not correctly configured yet.
Going back to the Setting tab and pressing the Save Settings button appeared to resolve this.
We’d like to know if the plugin can be modified to always check for the hard coded values in
wp-config.php
and default to them if present.
- The topic ‘Settings in wp-config.php require saving before working’ is closed to new replies.