Bani Gala, Islamabad info@spidawebs.com
Empower your business with captivating digital experiences crafted by experts.

WordPress Everything: Getting Started

Welcome to the first part of our series, “WordPress Everything.” In this series, we’ll explore the world of WordPress, from basics to advance. Whether you’re a beginner looking to create your first website or an experienced developer seeking to enhance your WordPress skills, this series aims to provide you with the knowledge and hands-on skills you need to make the most out of this powerful platform.

WordPress in 2003, started as an open source blogging platform, having a global user, developer and support community, has now transformed into the most popular and powerful Content Management System (CMS). WordPress distinguishes other user-generated content platforms on bases of the following factors:

  • Broad range of hosting options
  • Additional functionality tools (plugins)
  • Aesthetic and responsive layout designs and elements (themes)

History of WordPress

WordPress, launched in 2003 by Matt Mullenweg and Mike Little, started as a simple blogging platform built on top of b2/cafelog. Over the years, it has evolved into a full-fledged CMS. During this journey, WordPress went through continuous improvements, reflecting in its versions. At present, millions of websites (835 million approx.) on the internet are being powered worldwide by WordPress . The key to WordPress’s success is its open-source nature, extensive plugin ecosystem, user-friendly and appealing themes, and active community support.

WordPress Community

In addition to its significant usage, WordPress community is also contributing in its growth and popularity. Different events are organized by the community, providing developers and community members an opportunity to interact. WordCamp – community-hosted event, happens in dozens of cities around the world regularly with content writers, developers and contributors as participants. It is a good opportunity to meet the community members.

Less formal but organized more often than WordCamps are WordPress Meetups, comprising
users and developers in different cities around the globe. To check on locations and timetables for when and where people are talking about content management, you need to register yourself first to meetup.com.

WordPress Codex is a rich, multi-language WordPress information and documentation repository and open for everyone to contribute. For contribution to the WordPress documentation, register yourself and write away in the WordPress Codex.

Mailing lists also exist for various WordPress contributors and communities, with current roster of particular interest available online, such as wp-docs list to facilitate coordination and collaboration between members of the community who want to contribute to WordPress documentation and the wp-hackers list for those interested in extending WordPress either through plugins or improvements to the core code.

WordPress and GPL

WordPress is licensed under the Gnu Public License (GPL) version 2, contained in the license.txt file
placed in the top-level code distribution. Under GPL license, WordPress is distributed with certain freedoms:

  1. Freedom of Use
    • WordPress can be used commercially and non-commercially for any purpose.
  2. Freedom of Study
    • The source code of WordPress platform can be accessed and studied for learning and improvement purposes.
  3. Freedom of Modification
    • The source code of WordPress can be modified according to custom requirements, either for design improvement or functionality enhancement.
  4. Freedom of Distribution
    • The modified version of the WordPress can be freely distributed to others to benefit from.

GPL license ensures access of WordPress to everyone, empowering content producers, developers and businesses to collaborate and contribute for its growth. Some examples include:

  • Custom theme created by a developer and distributed among others for usage.
  • Plugin development by a company related to a specific industry for their clients.
  • Continuous improvement and updates in WordPress core by a global community of contributors working together to fix bugs, add new features, and enhance security.

WordPress as CMS

WordPress is a powerful and versatile CMS, allowing users to create, manage, and publish digital content on the web. A summarized description of WordPress as a CMS is given below:

Key Features of WordPress CMS

  1. User-friendly Interface
    • WordPress provides a simple and easy to use interface, that allows users to create, manage and publish content without any technical expertise.
  2. Customization
    • WordPress offers a wide range of themes and plugins for customization of design layouts and additional functionality for websites respectively.
  3. Content Organization
    • WordPress allows users to organize content into different types, such as; posts, pages, custom post types, taxonomies (categories and tags). It also has the provision of hierarchical content structure, such as parent and child pages and categories for logical organization.
  4. Media Management
    • WordPress has built-in media management features allowing users to upload, organize, and display media files including images, videos and audios. These media files can be directly inserted into their content using the editor or to showcase multimedia content through galleries and sliders.
  5. User Management
    • Multiple user roles and permissions are supported by WordPress, allowing site owners to assign different levels of access to subscribers, contributors, authors, editors and administrators. Each of these roles has specific capabilities and restrictions to control content and website management.

WordPress Installation

Now, let’s dive into the installation process of WordPress. Follow these steps to get started.

Step 1: Choose a Hosting Provider

Before installing WordPress, you need to choose a hosting provider that meets your requirements. Popular hosting providers include GoDaddy, Hostinger, Bluehost, SiteGround, and WP Engine, offering various plans tailored to your preferences.

Step 2: Register a Domain Name

Next, you’ll need to register a domain name for your website. This is your website’s address on the internet (e.g., www.yourwebsite.com). Many hosting providers offer domain registration services, simplifying the process.

Step 3: Install WordPress

Installing WordPress is a straightforward process, whether you opt for a one-click installation or manual setup. Here’s how to get started:

One-Click Installation

  1. Log in to your hosting account’s control panel (cPanel, Plesk, etc.). In case of cPanel use the link www.yourwebsite.com/cpanel.
  2. Look for the WordPress or Softaculous icon, usually found under the Auto Installers or Website section.
  3. Click on the icon and follow the on-screen instructions to install WordPress.
  4. During the installation, you’ll need to choose the domain where you want to install WordPress, set up an admin username and password, and select any additional options provided by your hosting provider.
  5. Once the installation is complete, you’ll receive a confirmation email with a link to your WordPress dashboard.

Manual Installation (Web Server)

  1. Download the latest version of WordPress from wordpress.org.
  2. Extract the WordPress.zip file to your computer.
  3. Using an FTP client (such as FileZilla), connect to your web server.
  4. Navigate to the directory where you want to install WordPress (usually the public_html folder for the main domain).
  5. Upload all the extracted files and folders to the server.
  6. Create a MySQL database through your hosting control panel under Database section.
  7. Rename the wp-config-sample.php file to wp-config.php and configure it according to your database created. Database creation and wp-config.php configuration steps are given in detail in Step 4.
  8. Save the changes and upload the wp-config.php file to your server.
  9. Visit your website’s domain in a web browser.
  10. Follow the on-screen instructions to complete the WordPress installation process, including setting up an admin username and password.
  11. Once the installation is complete, you’ll be directed to the WordPress dashboard, where you can start customizing your website.

Manual Installation (Local Server)

  1. Download and install a Local Server Environment for Windows and macOS and follow the installation instructions.
  2. Download the latest version of WordPress from wordpress.org.
  3. Extract the WordPress zip file to the htdocs directory within your local server environment installation folder and rename the folder to yourwebsite (name of your website).
    • Windows: This is typically located in C:\xampp\htdocs\ for XAMPP.
    • macOS: This is typically located in /Applications/MAMP/htdocs/ for MAMP.
  4. Open your web browser and navigate to http://localhost/phpmyadmin for Windows and http://localhost:8888/phpMyAdmin for macOS (default MAMP URL).
  5. Create a new database with a unique name. Note down the database name for later use.
  6. Open your web browser and navigate to http://localhost/yourwebsite for Windows or http://localhost:8888/yourwebsite for macOS.
  7. Follow the on-screen instructions to install WordPress. Enter the database name, username (default is root for local installations), password (default is blank for Windows and root for macOS), database host (default is localhost), and table prefix (default is wp_).
  8. After configuring WordPress, follow the steps for installation process completion.
  9. Upon completion, log in to the WordPress admin dashboard using the username and password specified during setup using the link http://localhost/yourwebsite/wp-admin for Windows and http://localhost:8888/yourwebsite/wp-admin for macOS.

Step 4: Creating and Configuring Database

  1. For setting up MySQL, you just need to ensure MySQL is running, create a user and then have that user create a database to store WordPress data. This can be done using tools like phpMyAdmin or directly through the MySQL command line.
  2. MySQL has its own system for users and permissions, which is separate from your operating system or your hosting provider’s system. For more information about MySQL permissions and how users are managed, you can refer to the MySQL Reference Manual.
  3. Once, the database is created, the information for Database Settings; DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, Database Table Prefix, Authentication Unique Keys and Salts, WordPress Language Setting, Debugging and Error Handling and WordPress Updates and File Editing is inserted in wp-config.php file.
wp-config.php
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the installation.
 * You don't have to use the web site, you can copy this file to "wp-config.php"
 * and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * Database settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://wordpress.org/documentation/article/editing-wp-config-php/
 *
 * @package WordPress
 */

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

/** Database username */
define( 'DB_USER', 'username_here' );

/** Database password */
define( 'DB_PASSWORD', 'password_here' );

/** Database hostname */
define( 'DB_HOST', 'localhost' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication unique keys and salts.
 *
 * Change these to different unique phrases! You can generate these using
 * the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
 *
 * You can change these at any point in time to invalidate all existing cookies.
 * This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         'put your unique phrase here' );
define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );
define( 'LOGGED_IN_KEY',    'put your unique phrase here' );
define( 'NONCE_KEY',        'put your unique phrase here' );
define( 'AUTH_SALT',        'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT',   'put your unique phrase here' );
define( 'NONCE_SALT',       'put your unique phrase here' );

/**#@-*/

/**
 * WordPress database table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the documentation.
 *
 * @link https://wordpress.org/documentation/article/debugging-in-wordpress/
 */
define( 'WP_DEBUG', false );

/* Add any custom values between this line and the "stop editing" line. */

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
	define( 'ABSPATH', __DIR__ . '/' );
}

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';

Step 5: Resolving Database Issues

Several things can go wrong when setting up WordPress with MySQL:

Web server can’t find MySQL

Sometimes, the web server can’t find the MySQL server and this could be due to incorrect configuration settings or issues with connectivity between the web server and MySQL. It could be due to different reasons.

  1. The configuration file wp-config.php might have the wrong hostname for the MySQL server. Double-check this to ensure it’s accurate.
  2. If the MySQL service isn’t running, the web server won’t be able to connect to it. To fix, start MySQL service.
  3. Sometimes, the connection between the web server and MySQL might be blocked by a firewall. As a solution, check the firewall settings and ensure that connections to the MySQL port (usually 3306) are allowed.
  4. Sometimes, the web server is trying to connect to a MySQL instance on the same machine but can’t access it through the socket connection. This can be fixed by creating a symbolic link.
  5. Network issues such as DNS resolution problems or misconfigured IP addresses can also prevent the web server from finding MySQL. Confirm that the network settings are correct, and the web server can reach the MySQL server’s IP address. Use ping or telnet to test connectivity.
  6. If the MySQL server is running out of resources or handling too many requests, it may not be able to respond to connections from the web server. As a solution, monitor the resource usage on the MySQL server and consider optimizing queries or upgrading hardware if necessary.

Can’t log in to the database

  1. Although the web server connects to the database, it may find hard to log in and this can happen if the provided username or password is incorrect or if there are authentication issues. To fix this, double-check the username and password in your wp-config.php file to make sure they’re accurate.
  2. Sometimes, there might be an issue with password authentication, especially if you’re using older versions of MySQL with certain PHP setups. In such cases, you can use MySQL’s old_password() function to convert the password to an older format that’s compatible. You can do this by running a specific SQL command in your MySQL command-line prompt or SQL window.
SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('password');

Can’t find the named database

  1. After logging in, WordPress needs to find the specific database to create its tables. If not found the named database, it means there might not be a database available for WordPress to use with the provided user credentials. You can verify the database setup by accessing MySQL through the command line using a command like show databases. If you find that the database wasn’t created or the permissions are incorrect, you can create a new database using the create database command.

Once WordPress installation is completed, a collection of tables named according to the table prefix set in the wp-config.php file can be seen. This can be verified by using MySQL command-line tools.

Congratulations! You’ve successfully installed WordPress and are ready to begin building your website.

Step 6: First Time Configuration

Once WordPress is installed, you can log in to your website’s dashboard using the credentials you set during the installation process. From here, you can customize your website’s appearance, install themes and plugins, create pages and posts, and manage various settings.

WordPress Dashboard Settings

Site Title and Tagline

  1. Navigate to the WordPress admin dashboard.
  2. Go to Settings > General.
  3. Set your site’s title and tagline. These will appear in search engine results and browser tabs.

Permalink Structure

  1. Still in Settings, go to Permalinks.
  2. Choose a permalink structure that’s SEO-friendly and descriptive. There are different options to choose from.

Reading Settings

  1. In Settings, go to Reading.
  2. Choose whether you want your homepage to display your latest posts or a static page. Also, set the number of posts displayed per page.

Discussion Settings

  1. Navigate to Settings > Discussion.
  2. Configure settings related to comments, such as enabling/disabling comments on posts, comment moderation, and comment author settings.

Media Settings

  1. Go to Settings > Media.
  2. Set default image sizes for thumbnails, medium, and large images uploaded to your site. Choose how uploaded files are organized.

User Registration

  1. Decide whether you want to allow user registration on your site.
  2. Go to Settings > General and check the Membership option if you want to allow users to register.

User Roles and Permissions

  1. Review and assign user roles to anyone who will be managing the site.
  2. Go to Users > All Users and adjust roles as necessary.

Theme Selection and Customization

  1. Choose a theme for your site from Appearance > Themes.
  2. Customize the theme’s settings, colors, fonts, and other layout options to match your brand and style.

Plugin Installation and Activation

  1. Install and activate plugins that add additional functionality to your site.
  2. Go to Plugins > Add New to search for and install plugins. Then, activate them as needed.

Create Content

  1. Begin creating content for your site, such as pages, posts, and media.
  2. Navigate to Pages > Add New to create new pages and Posts > Add New to create new blog posts.

Custom Menus

  1. Design custom menus to navigate through your site easily.
  2. Go to Appearance > Menus and create custom menus using pages, categories, custom links, etc.

Widgets

  1. Utilize widgets to add additional content and functionality to your site’s sidebars and widget-ready areas.
  2. Go to Appearance > Widgets to manage and customize widgets.

Customization and configuration settings will be discussed in detail in the next article.

Conclusion:

In this first part of “WordPress Everything” series, we’ve covered the history of WordPress, the installation process, and provided an overview of initial configurations for a website. Functional overview shall be discussed in detail in the next part.

Other Articles