Configuring Basic WordPress Settings

Tutorial 3 of 5

Configuring Basic WordPress Settings

1. Introduction

The goal of this tutorial is to guide you through the basic settings you need to configure to get your WordPress site up and running.

In this tutorial, you will learn how to:

  • Set your site title and tagline
  • Configure your permalink structure
  • Manage your discussion settings

There are no prerequisites for this tutorial as it's aimed at beginners. However, having a basic understanding of what WordPress is and how it works would be helpful.

2. Step-by-Step Guide

Setting your Site Title and Tagline

The site title and tagline represent your site's identity. They often appear in the header of your website, in search engine results, and browser tabs.

To set these, navigate to Settings > General in your WordPress dashboard. Here you will find fields to input your site title and tagline.

Configuring your Permalink Structure

Permalinks are the permanent URLs to your individual pages and posts, as well as your category and tag archives. A permalink is what another blogger will use to link to your article (or section), or how you might send a link to your story in an email message.

To configure your permalinks, navigate to Settings > Permalinks. WordPress offers multiple permalink structures. It's recommended to use the "Post Name" structure as it's more SEO-friendly.

Managing your Discussion Settings

Discussion settings allow you to control comments and how they are moderated. Navigate to Settings > Discussion to manage these settings. Here you can choose if you want to allow comments, how comments are moderated, what constitutes comment spam, and more.

3. Code Examples

While most WordPress settings can be configured via the WordPress dashboard, you can also modify settings directly in the WordPress code. Here are a few examples:

Changing Site Title and Tagline

The site title and tagline can be changed in the wp-config.php file:

define('WP_SITEURL', 'http://example.com');
define('WP_HOME', 'http://example.com');

The WP_SITEURL and WP_HOME options hold the site URL and the home URL of your website respectively. In most cases, these will be the same.

Setting Permalink Structure

In the .htaccess file, you can add the following code to set the permalink structure:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

This code sets the permalink structure to "Post Name".

4. Summary

In this tutorial, you learned how to configure basic WordPress settings, including setting your site title and tagline, configuring your permalink structure, and managing your discussion settings.

To continue learning, explore other WordPress settings and how they affect your site. WordPress has extensive documentation that covers these settings in detail.

5. Practice Exercises

  1. Exercise 1: Change your site title and tagline via the WordPress dashboard.
  2. Exercise 2: Change your permalink structure to "Post Name" and create a new post. Check the URL of the new post to see the permalink structure in action.
  3. Exercise 3: Configure your discussion settings to moderate all comments. Leave a comment on a post and see how it needs approval before it's published.

Solutions:

  1. Navigate to Settings > General and input your preferred site title and tagline.
  2. Navigate to Settings > Permalinks, select "Post Name", and click "Save Changes". Create a new post by going to Posts > Add New. After publishing, check the URL to see the new permalink structure.
  3. Navigate to Settings > Discussion and check the box next to "Before a comment appears > Comment must be manually approved". Leave a comment on a post and check your email for a moderation notice.