We discussed Content Management Systems (CMS) in that previous post, and WordPress is one of the most popular CMSs available. Depending on who you ask, WordPress CMS now powers between 20-25% of the websites on the internet, creating a powerful community of users, developers, and contributors to this open-source platform. At the end of the day, using a CMS like WordPress can speed up your time to market and make developing your site a much easier experience than coding it from scratch.
Get Started on WordPress
Head over to www.wordpress.org to download the WordPress code. Note that this is not www.wordpress.com, which this is the free and more limited version hosted on their server, and usually results in a domain such as www.yourwebsite.wordpress.com, which you don’t want for a commercial or professional site. Download the zip version of the code and extract these files into a folder on your computer.
1. Database Time
As with any CMS, you will need to store your content in a database and then as your site is displayed the content is retrieved from here. You will want to use MySQL on your server, which, as we mentioned previously, should come together as part of your hosting package.
Open your cPanel interface; this can usually be done by typing the following into your browser: www.yourwebsite.com/cpanel (replace “your website” with your actual domain name!). Log in to cPanel and click on the MySQL databases icon. Here you will be able to create a new database and give it a name; go ahead and call it something to do with your site, and create a login and strong password, noting these down somewhere for safe keeping. Just keep in mind: sometimes cPanel will add your cPanel login name to the front of your user database name; so if your database user name is “wpadmin”, and your cPanel login is “kkwong”,your login may become kkwong_wpadmin. Write down both just in case, and check this later to be sure.
2. Add Your Users
On the same page, you will have to assign this new user to your database. Select the user from the left side drop down menu and the database from the right side list and click “Add User To Database”. Once you have done this, we will need to add these details into WordPress.
Open the file on your computer with the downloaded WordPress code, and locate the file called “wp-config-sample.php”, and rename it as wp-config.php. Open this file in Notepad (or another text editor) and find this line of code:
You will need to replace ‘putyourdbnamehere’ with the name of your newly created database above. On the lines that follow, replace “usernamehere” with your MySQL username (such as “wpadmin”) and “yourpasswordhere” with your chosen MySQL password above. Save this file.
Now you can open FileZilla again and copy all of the files in the database folder to the root of your website. If you want to create a blog within your site, you can create a subfolder here. Open the /wp-admin/install.php within your root folder, and this will run the installer; on the install screen you can give your blog a title, enter your email address and click “Install”.
After a short wait you should see a Success message, and be given the username “admin” and a randomly generated password. Write these down, and if you want to change it to something easier to remember, you follow the next steps. Click Log In again, and enter your new username and password, which should bring you to a page suggesting you change your password. Make the change as necessary here, or you can always change it later at your Profile page.
3. Choose Your WordPress Theme
You will now have a WordPress dashboard set up at www.yourwebsite.com/wp-admin. Visit the front-end of your site and you will see a plain and dull looking WordPress theme; fortunately there are thousands of themes to choose from, and changing them is a simple process.
Go back to your dashboard, and click on Appearance -> Add New Themes. Here you will be able to browse through thousands of options, and select the theme that fits your site best. You can also preview themes here, to get a feel for how your site will look. Choose your theme, and press Install, which may prompt you to give your FTP information that you used with FileZilla. Click Proceed, and your theme should be installed; visit the front-end of your website by clicking “Visit Site” at the top left drop down menu of your dashboard, and you will now see your (content-empty) new theme! You’ll probably have to do some adjusting to the theme and layout, which we will cover in more detail in the coming blog posts.
So there you have it – go and get started on WordPress and you’ll have a site up and running in next to no time!