WordPress is an open source content management tool. It is written in PHP and MySQL. Sometimes it becomes necessary to change the database ports as it helps your website against port scans that can be done through port sniffing websites. By changing the port over time, you can add a layer of safety to your database. In this guide, we will explain how you can change the database port of your WordPress website by following these simple steps.
Prerequisites
- WordPress cPanel Credentials
- FTP application
- Text Editor (Sublime, Notepad)
Step 1:
Step 2:
Click on File Manager. You will see a list of files and folders.
Step 3:
Now, locate the wp-config.php file inside the public_html folder and right click to edit it. On clicking edit you will see a Text Editor box.
Step 4:
Search for the keyword DB_HOST. You will find a port address of the database after DB_HOST keyword.
Conclusion:
By following these simple steps, you can easily change the database port of your WordPress site. This adds an extra layer of protection against sniffers.
Check out these top 3 WordPress hosting services:
- Check out our recommendations for the best wordpress web hosting.