If the WordPress core were able to encrypt the data that was stored in the tables, then it would also have to be able to decrypt it too, so the encrypt and decrypt keys would be in the website somewhere. So what security would you have achieved ?
I have thought of other security illusions too. Like the database user is configured to have all privileges, surely this is excessive, like create table ability is only required for install or maintenance, so why not have two users, the normal WordPress runtime would not need table create say. But this achieves nothing, you have to have database update capability anyway, with it malicious code can destroy a website, so it does not matter.
]]>How can i encrypt user data in database
You really do not want to. Ever.
Here’s why: you need to access that data. You will need to decrypt that data to do so. You can either have your installation save that key in your database or in a file on your server.
Doing either of those makes encrypting your data pointless. If someone gets a copy of your key from your backup then they can decrypt your data and you’ve accomplished nothing.
Work on your process and how you handle off site backups. Those should be encrypted. Enforce encryption in transport via HTTPS. But actually encrypt your data on your server? That’s a lot of work to accomplish nothing.
]]>Read about one concept here
]]>