WordPress wp config database port

July 6, 2021 . 1 MIN READ

http://www.inmotionhosting.com/support/website/wordpress/change-database-port

  1. First,log into cPanel and open the file manager. If you don’t use cPanel, you may edit open any text editor you like.
  2. Within the file manager, you will navigate to yourwp-config.php  This file will be located within your root WordPress directory, typically your public_html directory. Right-click it and click on Code Edit.
  3. Now that you have thewp-config.php open, you will want to edit the following line:

define( ‘DB_HOST’, ‘localhost:3306’ );

As you can see, a port number has been added after the “:“. Here, simply add the port number of your database server.

 

Leave a Reply

Your email address will not be published. Required fields are marked *