CHAPTER 14 INSTALLING AND CONFIGURING WORDPRESS 383 (Shared web hosting)
CHAPTER 14 INSTALLING AND CONFIGURING WORDPRESS 383 Extracting the Files Before you transfer the WordPress files to your server, you ll need to expand the archive. The file you downloaded from the WordPress site is an archive, or a compressed collection of files. Then you will need to use FTP to transfer the WordPress files you downloaded earlier to your server. These tasks require the FTP program and expansion software I mentioned earlier as requirements. Extract the WordPress files from the archive into a convenient folder, such as C:wpwork or C:My Documentswpwork. You ll need this folder to work through the examples in this book. You should have approximately 160 files in various folders within C:wpwork. You ll need to copy one of them and edit it before you upload the files. Editing the Configuration File Find the wp-config-sample.php file and make a copy of it called wp-config.php, saving it in the same directory. Load that copy into an editor program a text editor, not a word processor. As I noted earlier, Notepad will work fine for now, if you don t have a specialized text editor. In this file, you need to change the dummy database connection settings to the real values. Find the part of the file that looks like Listing 14-1. Listing 14-1. MySQL Settings in wp-config.php // ** MySQL settings ** // define(’DB_NAME’, ‘wordpress’); // The name of the database define(’DB_USER’, ‘username’); // Your MySQL username define(’DB_PASSWORD’, ‘password’); // …and password define(’DB_HOST’, ‘localhost’); // 99% chance you won’t need. to change this value Fill in the details for the database name, database user, and password from the information you gathered earlier. As the comment says, it is very unlikely you will need to change the host setting. I have found only one hosting service that required the host setting to be changed. If you do need to change that setting, your hosting provider will have supplied that information along with your other details. You should end up with something like the settings shown in Listing 14-2. Listing 14-2. MySQL Settings Populated in wp-config.php // ** MySQL settings ** // define(’DB_NAME’, ‘wp_example’); // The name of the database define(’DB_USER’, ‘wp_db_user’); // Your MySQL username define(’DB_PASSWORD’, ’secret’); // …and password define(’DB_HOST’, ‘localhost’); // 99% chance you won’t need. to change this value If your installation of WordPress is going to share a database with another WordPress installation that is, if you plan to keep the data tables for multiple WordPress installations in the same database you ll also need to change the prefix setting just below the database connection setting, which looks like this:
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.