Blog

  • How to Create an XML Sitemap in WordPress and Submit It to Google

    An XML sitemap helps search engines discover important URLs on your website.

    If you have recently launched a WordPress website, creating and submitting a sitemap is one of the first technical SEO tasks worth learning.

    Fortunately, modern WordPress versions include built-in XML sitemap functionality.

    In this guide, you’ll learn how to find your WordPress sitemap, create one with an SEO plugin if needed, and submit it to Google Search Console.

    What Is an XML Sitemap?

    An XML sitemap is a file that lists URLs you want search engines to discover.

    It uses a structured XML format that search engine crawlers can understand.

    A sitemap may contain information such as:

    • Page URLs
    • Last modification dates
    • References to additional sitemap files

    For example, a simplified sitemap might look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
      <url>
        <loc>https://example.com/</loc>
      </url>
      <url>
        <loc>https://example.com/blog/</loc>
      </url>
    </urlset>

    A sitemap helps Google discover pages, but submitting one does not guarantee that every URL will be crawled or indexed.

    Step 1: Check the Built-In WordPress Sitemap

    WordPress 5.5 and later include basic XML sitemap functionality.

    For a standard WordPress installation, the sitemap index is commonly available at:

    https://example.com/wp-sitemap.xml

    Replace example.com with your website’s domain.

    Open the URL in your browser.

    If the sitemap is available, you may see links to separate sitemaps for posts, pages, and other supported content types.

    You do not necessarily need an additional SEO plugin just to generate a sitemap.

    Step 2: Create a Sitemap with an SEO Plugin

    SEO plugins can provide more control over which content types appear in your sitemap.

    Popular options include:

    • Yoast SEO
    • Rank Math
    • All in One SEO

    To install an SEO plugin:

    1. Log in to your WordPress dashboard.
    2. Navigate to Plugins → Add New Plugin.
    3. Search for your preferred SEO plugin.
    4. Install and activate it.
    5. Find the XML sitemap settings.
    6. Enable the sitemap feature if necessary.

    Many SEO plugins generate a sitemap index at a URL similar to:

    https://example.com/sitemap_index.xml

    The exact URL depends on the plugin.

    Avoid using multiple sitemap generators unnecessarily. Check which sitemap is active after installing an SEO plugin.

    Step 3: Decide Which Pages to Include

    Your sitemap should generally contain important canonical URLs that you want search engines to index.

    Examples include:

    • Published blog posts
    • Important website pages
    • Useful category archives
    • Other valuable public content

    You should generally exclude URLs that are intentionally blocked from indexing, duplicate URLs, and pages that redirect elsewhere.

    A sitemap should not be used to force Google to index low-quality or duplicate pages.

    Step 4: Add Your Website to Google Search Console

    Open Google Search Console:

    https://search.google.com/search-console

    Sign in with your Google account.

    If you have not added your website, create a property.

    Google Search Console supports two main property types.

    Domain property

    A Domain property covers multiple protocols and subdomains. Verification normally requires a DNS record.

    URL-prefix property

    A URL-prefix property covers URLs beginning with the specified prefix. Several verification methods may be available.

    Choose the property type that matches your needs and complete the verification process.

    Step 5: Submit Your XML Sitemap

    After verifying your website:

    1. Open your Search Console property.
    2. Select Sitemaps from the navigation menu.
    3. Enter the sitemap URL in the submission field.
    4. Click Submit.
    5. Check the reported status.

    For example, if your sitemap is located at:

    https://example.com/wp-sitemap.xml

    Submit that sitemap URL using the Search Console interface.

    Google will attempt to fetch and process the sitemap.

    If the submission fails, check whether the URL is publicly accessible and returns a valid XML sitemap.

    Step 6: Monitor Indexing in Search Console

    Submitting a sitemap is only the beginning.

    Use the Page indexing report to understand which pages Google has indexed and why some pages are not indexed.

    You may encounter statuses or reasons such as:

    Discovered – currently not indexed

    Google knows about the URL but has not crawled it yet.

    Crawled – currently not indexed

    Google crawled the page but has not indexed it.

    Duplicate, Google chose different canonical than user

    Google selected another URL as the canonical version.

    Not found (404)

    The requested URL returned a 404 response.

    Not every non-indexed URL represents a problem. Some pages should not be indexed.

    Step 7: Inspect an Individual URL

    The URL Inspection tool allows you to examine a specific page.

    Copy a published article URL and paste it into the inspection field.

    You can check:

    • Whether the URL is indexed
    • The last known crawl information
    • The canonical URL selected by Google
    • Whether indexing is allowed
    • Relevant crawl and indexing details

    If appropriate, you can request indexing.

    However, repeated indexing requests do not guarantee faster crawling or inclusion in search results.

    Common XML Sitemap Problems

    Sitemap Returns a 404 Error

    Check whether your sitemap generator is enabled.

    If you use an SEO plugin, confirm the correct sitemap URL.

    Sitemap Contains Unwanted URLs

    Review your SEO plugin’s content-type settings.

    Exclude content that should not appear in search results.

    Sitemap Is Valid but Pages Are Not Indexed

    A valid sitemap does not guarantee indexing.

    Review content quality, duplicate pages, canonical tags, and indexing restrictions.

    Sitemap Contains Redirected URLs

    Update the sitemap so it points directly to your preferred canonical URLs.

    Frequently Asked Questions

    Does WordPress automatically create an XML sitemap?

    Yes. WordPress 5.5 and later include built-in XML sitemap functionality, although plugins or custom configurations may change the behavior.

    Do I need to submit my sitemap every time I publish a post?

    Usually not. If your sitemap updates automatically, Google can fetch the updated version.

    Does submitting a sitemap improve Google rankings?

    A sitemap helps with URL discovery. It is not a direct guarantee of better rankings.

    How long does Google take to index a new WordPress website?

    There is no guaranteed timeframe. Crawling can take days or weeks, and some pages may never be indexed.

    Conclusion

    Creating an XML sitemap is a useful first step when learning technical SEO.

    For most modern WordPress websites, you can use the built-in sitemap or an SEO plugin.

    After submitting your sitemap to Google Search Console, monitor the indexing reports and inspect individual URLs to understand how Google discovers and processes your content.

    Remember that a sitemap supports discovery, while useful content, accessible pages, and sound technical configuration remain essential for search visibility.

  • How to Redirect HTTP to HTTPS in Nginx (301 Redirect Guide)

    HTTPS encrypts communication between a visitor’s browser and your web server.

    If your website supports HTTPS, visitors who open the HTTP version should generally be redirected to the secure version.

    For websites using Nginx, this can be accomplished with a simple server configuration.

    In this guide, you’ll learn how to configure an HTTP-to-HTTPS redirect, test it, and avoid common mistakes.

    Why Redirect HTTP to HTTPS?

    HTTPS provides several important benefits:

    • Encrypts data transmitted between browsers and servers
    • Helps protect information from interception or modification in transit
    • Enables secure browser features
    • Provides a consistent preferred URL for your website
    • Avoids maintaining separate HTTP and HTTPS versions of the same content

    Google also recommends using HTTPS for websites.

    However, HTTPS alone does not guarantee higher search rankings.

    Step 1: Make Sure HTTPS Works

    Before configuring a redirect, confirm that your website already has a valid TLS certificate.

    Open:

    https://example.com

    If the website loads successfully without a certificate warning, you can proceed.

    If HTTPS is not working, install and configure a certificate first.

    Let’s Encrypt provides free TLS certificates, and Certbot is one common tool for managing them.

    Your hosting control panel may also offer automated certificate installation.

    Step 2: Find Your Nginx Configuration

    On many Linux distributions, Nginx configuration files are stored in:

    /etc/nginx/

    Ubuntu and Debian installations often use:

    /etc/nginx/sites-available/

    Other installations may use:

    /etc/nginx/conf.d/

    To see the active configuration, run:

    sudo nginx -T

    Be aware that the output may include sensitive configuration values. Do not publish the full output without reviewing it.

    Locate the server block for your domain.

    Step 3: Add an HTTP-to-HTTPS Redirect

    For a standard website, you can configure a dedicated HTTP server block:

    server {
        listen 80;
        server_name example.com www.example.com;
    
        return 301 https://$host$request_uri;
    }

    Replace example.com with your domain.

    This configuration listens for HTTP requests and redirects them to HTTPS.

    For example:

    http://example.com/about/

    becomes:

    https://example.com/about

    The $request_uri variable preserves the requested path and query string.

    The $host variable uses the normalized request hostname. Make sure the accepted hostnames are explicitly configured and supported by your HTTPS certificate.

    For a website with one canonical hostname, using that hostname directly in the redirect is often clearer.

    For example:

    server {
        listen 80;
        server_name example.com www.example.com;
    
        return 301 https://example.com$request_uri;
    }

    This redirects both hostnames to the non-www HTTPS version.

    Step 4: Test the Nginx Configuration

    Before applying your changes, run:

    sudo nginx -t

    If Nginx reports that the configuration is valid, reload the service:

    sudo systemctl reload nginx

    If the test fails, correct the reported error before reloading.

    Step 5: Verify the Redirect

    You can use curl to inspect the HTTP response:

    curl -I http://example.com

    A successful permanent redirect should return a response similar to:

    HTTP/1.1 301 Moved Permanently
    Location: https://example.com/

    You can also test a specific path:

    curl -I http://example.com/contact/

    Confirm that the Location header points to the correct HTTPS URL.

    Step 6: Update WordPress URLs

    If your website uses WordPress, open:

    Settings → General

    Check these fields:

    • WordPress Address (URL)
    • Site Address (URL)

    Both should normally use HTTPS when your WordPress installation is configured to serve the site securely.

    For example:

    https://example.com

    Before changing these settings, ensure HTTPS is working and you have a recovery method in case the dashboard becomes inaccessible.

    If your site contains old HTTP links, update them carefully using a WordPress-aware migration tool rather than running unsafe text replacements on serialized database data.

    Common Problems

    Too Many Redirects

    Redirect loops can occur when Nginx, a CDN, or WordPress repeatedly redirects requests between HTTP and HTTPS.

    Check your reverse proxy settings and ensure WordPress correctly recognizes secure connections.

    HTTPS Certificate Warning

    A redirect does not fix an invalid certificate.

    Make sure the certificate covers the hostname visitors are redirected to.

    Mixed Content Warnings

    Mixed content occurs when an HTTPS page requests resources over HTTP.

    Update resource URLs to HTTPS where supported.

    Redirect Works for One Hostname Only

    Check the server_name directive and confirm that all intended hostnames are covered.

    If your website supports IPv6, also verify the relevant IPv6 listener configuration.

    Should You Use a 301 or 302 Redirect?

    A 301 redirect indicates that a resource has permanently moved.

    A 302 redirect indicates a temporary move.

    For a permanent HTTP-to-HTTPS migration, a 301 redirect is generally appropriate.

    A 308 redirect is another permanent redirect option and explicitly preserves the HTTP method.

    For a typical website migration, 301 is widely supported.

    Frequently Asked Questions

    Does Nginx automatically redirect HTTP to HTTPS?

    No. You generally need to configure a redirect yourself or use a hosting tool that configures it for you.

    Do I need a WordPress plugin for HTTPS redirects?

    Not necessarily. If you control Nginx, a server-level redirect is usually sufficient.

    Will HTTP-to-HTTPS redirects affect SEO?

    A properly configured permanent redirect helps search engines consolidate signals on the preferred HTTPS URL. Indexing and ranking changes can take time.

    Conclusion

    Redirecting HTTP to HTTPS in Nginx is straightforward once a valid TLS certificate is installed.

    Create an HTTP server block, return a permanent redirect, test the configuration, and verify the response using curl.

    Finally, check your website’s internal links, canonical URLs, and WordPress settings to ensure they consistently use HTTPS.

  • How to Fix “Error Establishing a Database Connection” in WordPress

    The “Error Establishing a Database Connection” message is one of the most common critical errors in WordPress.

    When this happens, your website may become completely unavailable.

    The error means WordPress cannot establish a working connection to its database.

    In this tutorial, we’ll examine the most common causes and explain how to fix them safely.

    What Causes This WordPress Database Error?

    WordPress stores important information in a MySQL or MariaDB database.

    This includes posts, pages, users, settings, and other website data.

    When WordPress cannot communicate with the database, it may display the connection error.

    Common causes include:

    • Incorrect database credentials
    • A stopped or unavailable database server
    • An incorrect database hostname
    • Database user permission problems
    • Too many database connections
    • Corrupted database tables
    • Server resource exhaustion

    Before making changes, back up your website files and database if possible.

    Step 1: Check Your wp-config.php File

    WordPress stores database connection settings in wp-config.php.

    This file is normally located in the WordPress installation directory.

    Open it using your hosting file manager or an SSH connection.

    Look for these settings:

    define('DB_NAME', 'wordpress_db');
    define('DB_USER', 'wordpress_user');
    define('DB_PASSWORD', 'your_database_password');
    define('DB_HOST', 'localhost');

    Check that:

    • DB_NAME matches the actual database name.
    • DB_USER is a valid database user.
    • DB_PASSWORD matches the user’s password.
    • DB_HOST points to the correct database server.

    The values above are examples. Your actual configuration will be different.

    Do not share your real database password publicly.

    Step 2: Check Whether MySQL Is Running

    If you manage your own Linux server, check the database service.

    For MySQL:

    sudo systemctl status mysql

    On some distributions, the service may be named mysqld.

    For MariaDB:

    sudo systemctl status mariadb

    If the service is stopped, investigate the reason before restarting it.

    You can also inspect recent service logs:

    sudo journalctl -u mysql -n 50

    Replace mysql with the appropriate service name.

    If the database stopped because of insufficient disk space or memory, simply restarting it may not solve the underlying problem.

    Step 3: Test the Database Connection

    If you have command-line access, try connecting with the same database user.

    For a local database:

    mysql -u wordpress_user -p wordpress_db

    Enter the password when prompted.

    If the connection succeeds, the database server and credentials are likely working for that connection method.

    If it fails, examine the error.

    For example:

    Access denied

    The username, password, or database privileges may be incorrect.

    Can’t connect to local MySQL server

    The database service may be stopped, the socket path may be incorrect, or the server may be unavailable.

    Unknown database

    The configured database name may not exist.

    Remember that localhost can use a Unix socket while 127.0.0.1 generally uses TCP. These connection methods may have different configurations.

    Step 4: Check Database User Permissions

    The WordPress database user needs appropriate permissions on its database.

    An administrator can inspect existing privileges using a statement such as:

    SHOW GRANTS FOR 'wordpress_user'@'localhost';

    The hostname in this example must match the actual database account.

    Do not automatically grant global privileges or use the MySQL root account for WordPress.

    Follow the principle of least privilege and grant only the permissions required by the application.

    Step 5: Check Disk Space and Server Resources

    A database server may stop working when the server runs out of disk space.

    Check available disk space:

    df -h

    You can also examine memory usage:

    free -h

    If the disk is full, identify large files and logs before deleting anything.

    Avoid manually deleting database files from MySQL’s data directory.

    If your server frequently runs out of memory, investigate database configuration, traffic, and other running services.

    Step 6: Investigate Database Corruption

    In some cases, damaged database tables can cause WordPress errors.

    However, do not assume that database corruption is the cause of every connection failure.

    First confirm that the database server is running and the credentials are correct.

    If logs indicate table corruption, create a backup and use the repair method appropriate for your database engine.

    WordPress also provides a database repair feature, but enabling it can expose a repair endpoint without normal authentication.

    If you use this feature, follow the official WordPress instructions and disable it immediately afterward.

    For production databases, consult your hosting provider or database administrator before attempting risky repairs.

    Step 7: Contact Your Hosting Provider

    If you use shared hosting and cannot access database services directly, contact your provider.

    Explain:

    • When the problem started
    • Whether the error affects the entire website
    • Whether you recently changed database credentials
    • Whether your hosting account reached resource limits
    • Any relevant error messages

    Your hosting provider may be able to identify database outages or account restrictions.

    How to Prevent Future Database Connection Errors

    Consider the following practices:

    • Keep reliable database backups.
    • Monitor available disk space.
    • Use secure database credentials.
    • Avoid unnecessary database plugins.
    • Keep WordPress and plugins updated.
    • Monitor database availability.
    • Test changes on a staging website.

    For business-critical websites, consider uptime monitoring to detect failures quickly.

    Frequently Asked Questions

    Will I lose my WordPress posts because of this error?

    Not necessarily. A database connection error does not automatically mean your data has been deleted.

    Can a WordPress plugin cause a database connection error?

    Plugins can contribute to resource exhaustion or database problems, although incorrect credentials and database service failures are also common causes.

    Should I reinstall WordPress?

    Usually not. Reinstalling WordPress should not be your first troubleshooting step because it may not address the database connection problem.

    Conclusion

    The WordPress database connection error is usually caused by a configuration, availability, or server resource problem.

    Start by checking wp-config.php, confirming that MySQL or MariaDB is running, and testing the database credentials.

    Avoid destructive database operations until you understand the cause and have a reliable backup.

  • How to Fix WordPress 404 Errors (6 Easy Solutions)

    A WordPress 404 error can be frustrating, especially when a page exists but visitors cannot access it.

    You might be able to open your homepage while individual blog posts return a “404 Not Found” message.

    Fortunately, many WordPress 404 problems are caused by permalink settings, rewrite rules, or incorrect URLs.

    This guide explains how to diagnose and fix common WordPress 404 errors.

    What Does a WordPress 404 Error Mean?

    An HTTP 404 status code means that the server cannot find a resource at the requested URL.

    In WordPress, this can happen when:

    • A post or page has been deleted.
    • The URL has changed.
    • Permalink rewrite rules are incorrect.
    • Apache or Nginx is misconfigured.
    • A plugin changes URL routing.
    • A migration leaves outdated internal links.

    A 404 response is normal for a page that genuinely does not exist. The goal is to fix unexpected errors, not eliminate every 404 response.

    Solution 1: Refresh WordPress Permalinks

    This is one of the easiest fixes for unexpected 404 errors.

    1. Log in to your WordPress dashboard.
    2. Go to Settings → Permalinks.
    3. Review your permalink structure.
    4. Click Save Changes.
    5. Try opening the affected page again.

    Saving permalink settings can refresh WordPress rewrite rules.

    If you use Apache, WordPress may also update the .htaccess file when the file is writable.

    If the error remains, continue with the next solution.

    Solution 2: Check Your .htaccess File

    Apache servers commonly use .htaccess to handle WordPress permalink rewriting.

    A typical WordPress installation in the domain root uses rules similar to these:

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

    Before modifying the file, create a backup.

    Check that Apache allows the necessary overrides and that mod_rewrite is enabled.

    If WordPress is installed in a subdirectory or uses a custom configuration, its rewrite rules may differ.

    Important: These Apache rules do not apply to Nginx.

    Solution 3: Check Nginx Rewrite Rules

    Nginx does not use .htaccess files.

    For a standard WordPress installation, the server configuration commonly includes:

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    This directive allows Nginx to serve existing files and directories while forwarding other requests to WordPress.

    Add it only within the appropriate server configuration. Existing location blocks and application requirements may need additional adjustments.

    After editing your configuration, test it:

    sudo nginx -t

    If the configuration is valid, reload Nginx:

    sudo systemctl reload nginx

    Avoid reloading Nginx when the configuration test fails.

    Solution 4: Check Whether the Page Exists

    Sometimes the problem is simply an incorrect URL.

    Open the WordPress dashboard and navigate to Posts or Pages.

    Check whether:

    • The content is published.
    • The post slug matches the requested URL.
    • The page was moved to the trash.
    • A parent page slug has changed.
    • The content is private or otherwise restricted.

    If you recently changed a URL, consider creating a permanent redirect from the old address to the new one.

    For example:

    /old-wordpress-guide/ → /new-wordpress-guide/

    A 301 redirect is generally appropriate when a page has permanently moved.

    Solution 5: Disable Plugins Temporarily

    Some plugins modify WordPress routing or redirect behavior.

    Possible sources of conflicts include:

    • Redirect management plugins
    • Security plugins
    • Multilingual plugins
    • Custom post type plugins
    • Caching plugins

    Temporarily disable recently installed or updated plugins, then test the affected URL.

    If the problem disappears, reactivate plugins one at a time to identify the conflict.

    On a production website, perform this test during a maintenance window or in a staging environment.

    Solution 6: Clear Your Cache

    Caching can cause outdated responses to remain visible after a configuration change.

    Clear relevant caches, including:

    1. WordPress caching plugin cache
    2. Server-side page cache
    3. CDN cache, such as Cloudflare
    4. Browser cache

    After clearing the cache, test the page in a private browsing window.

    How Do 404 Errors Affect SEO?

    Google does not treat every 404 response as a website problem.

    If a page was intentionally removed and has no replacement, returning 404 or 410 can be appropriate.

    However, unexpected 404 errors can prevent visitors and search engines from accessing important content.

    Use Google Search Console to identify URLs that Google cannot index because they return a 404 response.

    For each affected URL, determine whether you should restore the page, correct an internal link, redirect to a relevant replacement, or leave the 404 response in place.

    Avoid redirecting every missing URL to your homepage.

    Frequently Asked Questions

    Why does my WordPress homepage work but posts show 404 errors?

    This often indicates a permalink or server rewrite configuration problem.

    Does saving permalinks fix every 404 error?

    No. It may resolve rewrite-related problems, but deleted content, incorrect URLs, and server configuration issues require separate fixes.

    Should I redirect all 404 pages?

    No. Redirect only when there is a relevant replacement. A genuine missing page can return a 404 status.

    Conclusion

    Most unexpected WordPress 404 errors can be investigated by checking permalinks, server rewrite rules, page URLs, and plugin conflicts.

    Start with the simplest solution: save your permalink settings.

    If that does not work, examine your Apache or Nginx configuration and check whether the affected content still exists.

    Regularly reviewing broken internal links and Google Search Console reports can help you identify problems before they affect more visitors.

  • How to Fix WordPress Emails Not Sending (Step-by-Step Guide)

    WordPress uses email notifications for important activities such as password resets, contact form submissions, new user registrations, and WooCommerce orders.

    However, sometimes WordPress stops sending emails, even though the website itself works normally.

    If your WordPress emails are not sending, the problem is often related to how your hosting server handles outgoing mail.

    In this guide, you’ll learn how to identify the problem, configure SMTP, and test whether WordPress can send emails successfully.

    Why Is WordPress Not Sending Emails?

    By default, WordPress uses the wp_mail() function to send email messages.

    This function usually relies on the server’s configured mail transport. On many hosting environments, PHP’s mail() function is used.

    Unfortunately, this method can be unreliable for several reasons:

    • Your hosting provider restricts outgoing email.
    • The server’s mail service is not configured correctly.
    • Your domain does not have appropriate SPF or DKIM records.
    • Messages are rejected or classified as spam.
    • A WordPress plugin causes a mail-related error.
    • The recipient’s email provider blocks the message.

    Before changing your settings, check your spam folder and confirm that the recipient’s address is correct.

    Step 1: Install an SMTP Plugin

    One of the easiest ways to improve WordPress email delivery is to configure an authenticated email service.

    A popular option is WP Mail SMTP.

    To install it:

    1. Log in to your WordPress dashboard.
    2. Navigate to Plugins → Add New Plugin.
    3. Search for WP Mail SMTP.
    4. Install and activate the plugin.
    5. Open the plugin’s settings page.

    The plugin provides several ways to connect WordPress to an email provider.

    Step 2: Choose an Email Provider

    You can use a supported email API or an SMTP service.

    Common options include:

    • Brevo
    • SendGrid
    • Mailgun
    • Amazon SES
    • A compatible SMTP mailbox

    For a small personal website, an existing email service may be sufficient.

    For a production website, a dedicated transactional email provider may offer better delivery monitoring.

    Choose a provider that supports your domain and follow its current setup instructions.

    Step 3: Configure SMTP Settings

    If you choose the Other SMTP option, you will typically need the following information:

    SettingExample
    SMTP Hostsmtp.example.com
    EncryptionTLS
    SMTP Port587
    AuthenticationEnabled
    SMTP Usernameyour-email@example.com
    SMTP PasswordProvider-issued credential

    These are example settings only. Use the exact host, port, and authentication method supplied by your email provider.

    When supported, OAuth or API-based authentication is preferable to storing a mailbox password.

    Do not publish your SMTP credentials in screenshots or tutorials.

    Step 4: Configure SPF, DKIM, and DMARC

    Email authentication helps receiving servers determine whether messages are authorized to come from your domain.

    Three important technologies are:

    SPF (Sender Policy Framework)

    SPF identifies which servers are authorized to send email for your domain.

    DKIM (DomainKeys Identified Mail)

    DKIM adds a cryptographic signature that receiving servers can verify.

    DMARC (Domain-based Message Authentication, Reporting and Conformance)

    DMARC defines how receiving servers should handle messages that fail authentication and provides reporting capabilities.

    Your email provider should supply the required DNS records.

    Add these records through your domain’s DNS management panel and verify them using the provider’s instructions.

    Avoid creating multiple SPF TXT records for the same domain.

    Step 5: Send a Test Email

    After saving your settings:

    1. Open WP Mail SMTP.
    2. Navigate to its email testing feature.
    3. Enter an email address you control.
    4. Send a test message.
    5. Check your inbox and spam folder.

    A successful plugin test confirms that WordPress handed the message to the configured mail service. It does not guarantee that every future email will reach the recipient’s inbox.

    If the test fails, review the error message.

    Step 6: Troubleshoot Common SMTP Errors

    SMTP Authentication Failed

    This usually indicates incorrect credentials or an authentication method that the provider does not accept.

    Check the username, password, and account security settings.

    Connection Timed Out

    A timeout may indicate that the hosting provider blocks outbound SMTP connections.

    Check whether your hosting provider permits traffic on the required port.

    Email Sent but Not Received

    If the sending service accepts the message but the recipient does not receive it, investigate:

    • Spam filtering
    • SPF and DKIM authentication
    • Domain reputation
    • Sender and recipient addresses
    • Delivery logs provided by your email service

    Frequently Asked Questions

    Can WordPress send emails without an SMTP plugin?

    Yes. WordPress can send email using its default mail functionality when the server is configured correctly. However, authenticated mail services often provide more predictable delivery and troubleshooting.

    Is WP Mail SMTP free?

    WP Mail SMTP offers a free version with basic configuration features. Some advanced integrations and functionality require a paid plan.

    Why are WordPress password reset emails not arriving?

    Possible causes include server mail restrictions, incorrect email configuration, spam filtering, or plugin conflicts. Start by testing the site’s email configuration.

    Conclusion

    If WordPress emails are not sending, start by confirming whether the problem is with WordPress, the mail server, or the recipient’s email provider.

    For many websites, configuring a reliable SMTP or transactional email service is an effective solution.

    After setup, test password reset emails and contact form notifications to ensure the features your visitors depend on are working correctly.