WordPress Tutorial
Lesson 47 of 50 (94%)
94% Complete

Deploy WordPress Online

Learn how to publish a WordPress website on the internet using a domain name, web hosting, a database, and an SSL/TLS certificate.

Learning Objectives: By the end of this lesson, you will understand domain names, hosting, server requirements, WordPress installation, website migration, DNS configuration, HTTPS, and post-deployment testing.

1. What Is WordPress Deployment?

WordPress deployment is the process of making a WordPress website available on a live server so that people can access it through a public domain name.

For example, a developer may first create a website on localhost and later publish it at a domain such as example.com.

Local Website vs Live Website
Localhost

The website runs on your computer using a local development environment such as XAMPP.

Live Server

The website runs on an internet-accessible hosting server and can be visited through its configured domain name.

2. Requirements for Deploying WordPress

Before deploying your website, arrange the following:

Essential Requirements
  • A registered domain name
  • A suitable web hosting plan
  • Supported PHP version
  • MySQL or MariaDB database
  • Web server such as Apache or Nginx
  • SSL/TLS certificate for HTTPS
Helpful Tools
  • Hosting control panel
  • File Manager or SFTP client
  • phpMyAdmin or another database tool
  • Website backup solution
  • Browser for testing the website
  • Staging environment when available
Check the current WordPress server requirements and your hosting provider's compatibility information before choosing a hosting plan.

3. What Is a Domain Name?

A domain name is the human-readable address visitors use to access a website.

Examples:

example.com
soopropathshala.com
mywebsite.in

Domain names are registered through domain registrars. After registration, you configure DNS records or nameservers so that the domain directs visitors to the appropriate hosting service.

4. What Is Web Hosting?

Web hosting provides server resources where your website files and database can run. Visitors access the website over the internet.

Hosting Type Description Typical Use
Shared Hosting Multiple websites share server resources. Small websites and beginner projects.
Managed WordPress Hosting Hosting designed to simplify WordPress management. Businesses and content websites.
VPS Hosting A virtual server with more configurable resources. Growing websites and custom setups.
Cloud Hosting Hosting resources delivered through cloud infrastructure. Websites with changing resource needs.
Dedicated Server A physical server allocated to one customer. Workloads requiring substantial control or resources.

5. Prepare Your Hosting Account

After purchasing a hosting plan, sign in to your hosting control panel and prepare the environment for WordPress.

Hosting Setup Steps
  1. Open your hosting control panel.
  2. Add or select the domain for your website.
  3. Check that a supported PHP version is available.
  4. Create a MySQL or MariaDB database.
  5. Create a database user and grant the necessary privileges.
  6. Locate the document root for your domain.
  7. Confirm that SSL/TLS is available.
  8. Keep your hosting credentials secure.

6. Method One: Install WordPress Using One-Click Installer

Many hosting providers offer a WordPress installer through their control panel. The exact interface depends on the hosting provider.

Installation Steps
  1. Log in to your hosting control panel.
  2. Open the WordPress installer or website application installer.
  3. Select WordPress.
  4. Choose the domain and installation directory.
  5. Enter the site title and administrator details.
  6. Choose the database settings if requested by the installer.
  7. Start the installation.
  8. Open the website and test the administrator login.

Once installed, the administration dashboard is commonly available at the following path:

https://example.com/wp-admin/
Use your own domain in place of example.com. Never share administrator passwords or leave default credentials in place.

7. Method Two: Upload WordPress Manually

Manual installation gives you more control over the process. It requires uploading WordPress files and connecting the installation to a database.

Manual Installation Procedure
  1. Download WordPress from its official website.
  2. Upload the WordPress files to your domain's document root.
  3. Create a database and database user.
  4. Grant the user the required database privileges.
  5. Open your domain in a browser.
  6. Follow the WordPress installation wizard.
  7. Enter the database connection details.
  8. Set a secure administrator username and password.
  9. Complete installation and sign in to the dashboard.

8. Method Three: Migrate an Existing WordPress Website

If your website is already developed on localhost or another server, you can migrate it instead of creating a new installation.

Migration Workflow
  1. Back up the original website files and database.
  2. Upload the website files to the destination server.
  3. Create the destination database and user.
  4. Import the SQL database backup.
  5. Update the database credentials in wp-config.php.
  6. Update domain references if the domain has changed.
  7. Configure DNS and HTTPS.
  8. Test the website before completing the migration.

Use a WordPress-aware migration tool or a careful manual process to update URLs. WordPress data can contain serialized values, so a simple global SQL text replacement may corrupt data.

9. Configure DNS

DNS (Domain Name System) helps direct a domain name to the correct internet service.

DNS Record Purpose
A Maps a domain or hostname to an IPv4 address.
AAAA Maps a domain or hostname to an IPv6 address.
CNAME Points one hostname to another hostname.
MX Specifies mail servers for a domain.
TXT Stores text values used for verification and email security policies.

Typical domain setup steps:

  1. Find the DNS instructions provided by your hosting company.
  2. Open the DNS settings at your registrar or DNS provider.
  3. Update the nameservers or required DNS records.
  4. Check the root domain and the www hostname.
  5. Allow time for DNS changes to propagate.
  6. Verify that the domain reaches the correct hosting service.
Do not change email-related DNS records without checking your email hosting configuration. Incorrect MX or related records can interrupt email delivery.

10. Enable HTTPS

HTTPS encrypts the connection between the visitor's browser and the website. A valid SSL/TLS certificate is required for a properly configured HTTPS website.

HTTPS Setup Checklist
  • Activate a valid certificate for your domain.
  • Confirm that the certificate covers the required hostnames.
  • Configure the hosting server to use HTTPS.
  • Set the WordPress site URLs to the correct HTTPS URLs.
  • Check for HTTP resources that cause mixed-content warnings.
  • Test redirects from HTTP to HTTPS.

Depending on your hosting provider, certificates may be issued automatically or configured through the hosting control panel.

11. Check WordPress Site URLs

WordPress uses two important URL settings:

Setting Meaning
WordPress Address (URL) The location of the WordPress core installation.
Site Address (URL) The public address visitors use to reach the website.

These settings are usually available under Settings > General in the WordPress dashboard, if they are not controlled by configuration constants or other deployment settings.

WordPress Address:
https://example.com

Site Address:
https://example.com

These are example values. The correct settings depend on your actual domain and installation directory.

12. Test Your Website After Deployment

A successful installation does not guarantee that every feature works correctly. Test the important parts of your website after deployment.

Website Testing Checklist

13. Common Deployment Problems

Problem Possible Reason What to Check
Domain does not open DNS is incorrect or has not propagated. Nameservers, DNS records, and hosting configuration.
Database connection error Incorrect database settings or unavailable database. wp-config.php, credentials, and privileges.
HTTP 500 error PHP error, incompatible code, or server configuration. Server logs, PHP compatibility, and plugin/theme errors.
Images are missing Missing files or incorrect media URLs. wp-content/uploads and URL references.
Styles are missing Incorrect paths, cache, or mixed content. Browser developer tools and stylesheet URLs.
Website redirects incorrectly Old URL settings or conflicting redirect rules. WordPress URLs, server redirects, and caching.

14. Secure Your Live Website

After deployment, follow these security practices:

  • Keep WordPress core, themes, and plugins updated.
  • Use strong administrator passwords and two-factor authentication.
  • Remove unused themes and plugins.
  • Maintain secure backups outside the production site.
  • Use appropriate file permissions.
  • Protect database credentials and configuration files.
  • Monitor uptime, errors, and suspicious activity.
  • Keep only the user accounts and permissions you need.

15. Practical Assignment

Your Task
  1. Create a simple WordPress website on localhost.
  2. Choose a domain and suitable hosting environment.
  3. Create a database and database user.
  4. Install WordPress using a hosting installer or manual installation.
  5. Alternatively, migrate your local website using a backup.
  6. Configure your domain's DNS as instructed by your provider.
  7. Enable HTTPS and verify the certificate.
  8. Test pages, images, menus, forms, and the administrator dashboard.
  9. Prepare a backup and deployment checklist.

16. Lesson Summary

  • Deployment makes a WordPress website available online.
  • A domain name provides the public website address.
  • Hosting supplies the server environment and database.
  • WordPress can be installed with an installer or manually.
  • Existing websites can be migrated using files and database backups.
  • DNS directs the domain to the appropriate hosting service.
  • HTTPS helps protect data transmitted between visitors and the website.
  • Testing, security, and backups are essential after deployment.

Lesson 47 Quiz: Deploy WordPress Online

Choose the correct answer for each question.

1. What is the main purpose of web hosting?

2. Which DNS record maps a hostname to an IPv4 address?

3. What should you do after deploying WordPress online?