ASPNetFAQ.com: What is ASP.NET?

Technology posts on ASP.NET, IIS, Windows (+ a little Linux), Cloud Servers, Hosting, and more!
  • Blog Home
Search the site...

Update Your WordPress Database Connection String

Tweet
Share
0 Shares

I recently decided to create a test/development instance of a WordPress site that I run. In part of doing this I had to deal with how to backup one MySQL database and restore it to another database. After that was done, and I copied over the content files, I had to tell WordPress where to find the new database and how to connect to it.

Looking for the BEST WordPress Hosting?
Read my review of the Best WordPress Hosting or click the banner below to check out SiteGround's plans - starting under $4/month!
Do you already have a site? They'll migrate it for you - FREE!

Web Hosting

How is this done? Find the wp-config.php file that’s located in your WordPress site. Open that file in your favorite text editor (like WebMatrix) and look for the database connection settings, which will be near the top of the file (after a large block of comments). It should look like…

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '*NameOfTheDatabase*');

/** MySQL database username */
define('DB_USER', '*NameOfTheDatabaseUser*');

/** MySQL database password */
define('DB_PASSWORD', '*TheDatabaseUserPassword*');

/** MySQL hostname */
define('DB_HOST', '*TheNameOfTheDatabaseServer*');

The sections are self-explanatory so just go through one line at a time and edit the fields to match the database server name, database name, username for the connection, and the password for the database user. Save the file and you should be good to load up your new WordPress site now.

Happy hosting!

More from my site

  • Convert a Folder to an Application on a Remote IIS HostConvert a Folder to an Application on a Remote IIS Host
  • Manually Remove the W3 Total Cache WordPress pluginManually Remove the W3 Total Cache WordPress plugin
  • Linking spam sent through shared IIS SMTP server to a userLinking spam sent through shared IIS SMTP server to a user
  • Change the WordPress Domain Name After Moving a SiteChange the WordPress Domain Name After Moving a Site
  • Restore MySQL Dump File to a Different Database NameRestore MySQL Dump File to a Different Database Name
Tweet
Share
0 Shares
cytanium, Hosting, MySQL, System Administration, Wordpress

Comments are closed.

Proverbs 19:20

"Get all the advice and instruction you can, so you will be wise the rest of your life."

A Note On WordPress Hosting

Our main focus is of course .NET, but with a mix of Linux, virtualization, and other technologies. But if you're really looking for the best WordPress hosting specifically, read my WordPress host review to save yourself hassle AND money!




Recent Posts

  • What makes good web hosting?
  • jQuery Mobile C# ASP.NET and N5 Networks Software Repository
  • Open Source Bug Tracking Software and the Orchard Project
  • ASP.NET Development with Dreamweaver MX: Visual QuickPro Guide
  • Kendo UI Sample, ASP.NET Ajax Tutorial & More

Tags

.NET ASP.NET Automation blog centos cloud CMS css cytanium Development/Coding Email gmail Hosting htaccess IIS javascript Learning Linux logparser MVC MySQL Orchard OrcsWeb performance PHP PowerShell redirect RHEL security server SherWeb smtp SQL/Databases System Administration tip Troubleshooting Ubuntu virtualization Visual Studio web farm web hosting WebMatrix Windows windows server Wordpress

Categories

  • ASP.net development
  • Development/Coding
  • Hosting
  • IIS (Internet Information Services)
  • SQL/Databases
  • System Administration
  • Virtualization
(c) 2019 ASPNETFAQ.com