Encrypting the DB-Password in the wp-config.php is of no use, neither in your use-case nor in any other.
What is encrypted, has to be decryptable by the system in order to access the database, which means if an attacker is able to get your wp-config.php, he can get everything he needs to decrypt the encrypted password.
For your use case (preventing wp-config to be downloadable if the php-handler is not set), you can put your wp-config.php in a folder that is not accessible by web. Further information can be found here.
Related Posts:
- Please explain how WordPress works with MySQL character set and collation at a low level
- Connect to database using wordpress wp-config file
- Custom DB_COLLATE (collation) value not working on fresh install?
- How do I properly update the WordPress database password?
- Switching Databases in LocalHost
- Rename a table in MySQL
- How should I tackle –secure-file-priv in MySQL?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- phpMyAdmin – Error > Incorrect format parameter?
- MySQL Database User: Which Privileges are needed?
- Why is my database import losing text widget data?
- Checking if Database Table exists
- How to fetch Data in WordPress using MySQLi or $wpdb
- Reset Post IDs to less than 64bit integer
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- WordPress database scalability from the code perspective
- How to define composite keys with dbDelta()
- Is it possible to define two databases for one installation?
- Does WordPress use the InnoDB engine for MySQL by default?
- How To Make Connection To WordPress Data Base In A Plugin?
- Split WP install between 2 databases?
- Inserting Post Meta From SQL
- Accessing two databases
- Is altering a default WordPress database table update safe?
- Huge wp_options table
- “MySQL server has gone away” since update to 3.8
- Change all http to https in mysql databse?
- Can I transfer a mysql database to another site?
- WordPress and automated MySQL backups to a different host
- MySQL Syntax Error upon restoring database from backup [closed]
- Help running a MySQL query to update all wp_#_options tables in a Multisite install
- How to verify password outside WordPress?
- Size article thumbnails and retrieve them directly from database
- Is it safe to convert tables from MyISAM to InnoDB?
- Emojis getting converted to “?”
- wpdb_prepare with multiple or condition
- WordPress Install and Database on separate hosting?
- WordPress mysql table double prefixes
- Error establishing a database connection on Installation
- Moving WP from local server to live, error establishing a db connection
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- Why do mass updates to post_content shows in front end, but not in edit screen?
- Error establishing database connection – high traffic?
- Using GROUP CONCAT in my-sql query with wp_usermeta table
- Create table from array with prepare
- Localhost to Staging to Development Dynamic WP-CONFIG
- How to share plugin created database tables between two WordPress sites
- How to prevent/delay MySQL connections when an object cache is used?
- Migrating from PDO using SQLite to clean new install using MySQL
- Convert user passwords to MD5?
- Duplicated site isn’t recognized as a site
- Error establishing a database connection,
- Changing root password in PHPMyAdmin for WordPress Database when going live
- How to properly check if a table exists in WordPress Database using Show Tables Query
- Can’t update WordFence Options, clear data manually
- Changing between Local Host DB to Production DB and in reverse
- How and where is wordpress adding mySQL content to database?
- Is my way to change WordPress server is correct?
- Query Column of Specific ID from Database Table
- How to create more than one new wpdb object?
- How to connect and insert data in database of wordpress?
- Buddypress avatar image in database [closed]
- $wpdb->get_var – What value is returned when zero records are found?
- Remote database -> massive response time increase?
- Installing local to live WP into subdirectory
- Getting “Error Establishing a Database Connection” on localhost in new Mac OSX Lion environment
- Cloning blog to localhost via WAMP
- Getting WordPress to work inside a rails 3 application
- Only allow user to access a link once a year, based on their joining date
- WordPress keeps redirecting to localhost
- Counting post and changing roles in mysql database. Query not code
- MSQL database wp_postmeta has meta key tve_revision
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- How to edit custom table data in frontend
- local wordpress broke after changing URL
- “BS_” rows in postmeta table
- Exporting Post ID, Post Title, Primary Category and Primary Category ID
- Duplicate database to roll back theme & content changes
- How to create index (sql) to a meta_key?
- WPCLI search and replace in a particlar site dir effect another site-dir
- Confused over wp-config.php and ‘database user + database password + name’
- mySQL database size large, but tables size less
- After renaming MySQL database, I can no longer access my Blog page
- How To connect to the same WordPress database with different database user
- Possible to restore wordpress database from mysql56 and sqlite files?
- Hang Up Followed By Can’t select database
- execute custom function on database connection error
- I have include wp-config, should I add global $wpdb also?
- Can’t Install WordPress (local) Failed to open file wp-includes/wp-db.php
- Issue “Error establishing a database connection” problem.
- Create a new table on the database and save parameters from a contact form
- Why is converting my database to UTF-8 truncating entries?
- /var/run/mysqld/mysqld.sock
- How to back-up a database on IIS
- export individual posts to text files or a single csv file
- How to store a plain password in WordPress database in another field
- Can I connect WordPress website with an external database?
- WordPress database connection failed, while mysql client is working [closed]