Common WordPress Configuration

How Can We Help?

Common WordPress Configuration

You are here:
< Back to the Wiki

Did you just set up your WordPress installation and are you wondering what basic configuration to add to it as an admin? This article gives you some handy tips to manage WordPress like a pro.

Prerequisites

This configuration was set up based on WordPress 6.2.2.

Updates

Since I manage several different WordPress instances it will be a nightmare to update everything manually. Therefore, I prefer to enable automagic updates over updating WordPress and its themes and plugins.

WordPress

To check for WordPress updates navigate to Dashboard – Updates. Under Current version, you will find the update settings for WordPress. You can choose between the following options:

  • Automatic updates for maintenance and security releases only
  • Automatic updates for all new versions of WordPress

If a new update is ready this page will also show it and, if enabled, when it will be installed. Additionally, the page shows updates for plugins, themes, and other components.

If these WordPress update options are not available, add or modify the following entries in your wp-config.php:

define('AUTOMATIC_UPDATER_DISABLED', false);
define('WP_AUTO_UPDATE_CORE', true);

Plugins

To manage plugins and their updates you can either go to the update dashboard or you can navigate to Plugins – Installed plugins. Under Plugins – Installed plugins you have the ability to update individual or plugins in bulk.

It is also possible to enable/disable automagic-updates per plugin.

Themes

To manage themes and their updates you can either go to the update dashboard or you can navigate to Appearance – Themes. Under Appearance – Themes you can update your themes

It is also possible to enable/disable automagic-updates per theme.

User Management

Since WordPress is so widely known, plenty of people will figure out where to find your login page. To make sure an attacker is not going to guess your administrator credentials it is recommended to set up an administrator user with difficult-to-guess credentials.

In case your administrator account’s username is easy to guess and you want to change it, navigate to Users – Add New. Fill in the following fields.

  • Username: Something difficult to guess, i.e. Luckily2144
  • Email: Your administrator’s email
  • First Name: I recommend filling in admin to identify later that this is your administrator account
  • Password: A very strong password 😉
  • Role: Administrator

Once you are satisfied click Add New User. Now login with that user and navigate to Users – All Users. Hover over your old administrator account and click delete. Make sure to dedicate the content to your new administrator account and confirm it.

Site Health

The site health check shows information about your WordPress configuration and items that may need your attention. To view the site health, navigate to Tools – Site Health. Wait until WordPress scans your site, and validate the suggestions of WordPress.

Settings

Make sure to set the following settings under Settings – General:

  • Site Title: Title of your site
  • Tagline: Optional subtitle of your site
  • Site Icon: Logo in icon version for your website
  • WordPress Address (URL): Your site URL (can be set as define('WP_SITEURL', 'https://wiki.mphslaats.com'); in wp-config.php)
  • Site Address (URL): Your site URL (can be set as define('WP_HOME', 'https://wiki.mphslaats.com'); in wp-config.php)
  • Administration Email Address: Used to send administrator emails to
  • Membership: Enable if you want people to be able to sign up
  • New User Default Role: I recommend Subscriber, this can always be elevated
  • Site Language: Your preferred language (English)
  • Timezone: Your preferred timezone (Amsterdam)
  • Date Format: Your preferred date format (F j, Y)
  • Time Format: Your preferred time format (g:I A)
  • Week Starts On: Monday (of course)

Make sure to set your preferred permalink structure under Settings – Permalinks.

Set or generate your privacy page under Settings – Privacy.

WordPress behind a Reverse Proxy

When you are running your WordPress instance behind a reverse proxy and it looks like the CSS is not loading from the admin panel, or you are experiencing weird redirects since you have HTTPS enabled. Open your wp-config.php and add the following line:

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
   $_SERVER['HTTPS']='on';

Cron jobs

After installing UpdraftPlus and using it, it notified me that cron jobs were disabled. To verify this open your wp-config.php and check for a key called DISABLE_WP_CRON. Make sure it is set to false as follows:

define( 'DISABLE_WP_CRON' , false );

Plugins

In this section, we will cover the plugins I recommend to install on each WordPress instance.

Google Analytics

It is recommended that you set up Google Analytics to analyze site traffic, engagement, and more. More information can be found at wiki.mphslaats.com.

Dark Mode

Like a true programmer, I prefer a dark mode everywhere. To enable that I recommend the WP Dark Mode (wordpress.org) plugin.

Organize Admin Notices

When you use WordPress, you will eventually install plugins. There are tons of plugins available, including free ones. But there is a catch: When installing these plugins, your WordPress instance will be flooded with notifications. To capture them in a toggleable form, install the Organize Admin Notices (github.com) plugin.

Email Service

To get emails from WordPress it is recommended to set up an email service since the out-of-the-box solution does not always work. For this, you can set up WP Mail SMTP plugin (wordpress.org), more information can be found at wiki.mphslaats.com.

Backup

To back up and restore your website, I recommend installing UpdraftPlus (wordpress.org).

Go to the UpdraPlus area and click Settings. Here you can set the following settings:

  • Files backup schedule: I recommend Weekly and 3 retentions
  • Database backup schedule: I recommend Weekly and 3 retentions
  • Enable your preferred remote storage. I use Google Drive, in case of issues, disconnect and reconnect your account.

Restore

To restore snapshots or do site management, I recommend to have the following plugins installed

Site Optimization

To optimize your website, i.e. database, caching, images, etc. a plugin like WP-Optimize (wordpress.org) can help greatly.

For database configuration, you can set the following under Database – Settings:

  • Keep last 2 weeks data
  • Always keep 2 post revisions
  • Enable scheduled clean-up settings:
    • Monthly
    • Optimize database tables: Yes
    • Clean all post revisions: Yes
    • Remove auto-draft posts: Yes
    • Remove trashed posts: Yes
    • Remove spam and trashed comments: Yes
    • Remove expired transient options: Yes
    • Remove orphaned user meta: Yes

For image configuration, you can set the following settings under Images:

  • Automatically compress newly added images: Yes
  • Show compression meta-box on an image’s dashboard media page: Yes
  • Compression options: Custom: 3/6
  • Create WebP version of image: Yes
  • Advanced:
    • Preserve EXIF data: No
    • Backup original images: Yes
    • Automatically delete image backups after 50 days: Yes

For cache configuration, I only enabled:

  • Enable page caching
  • Generate separate files for mobile devices

I disabled Minify since I was having issues with JavaScript too often.

Enable the 404 Detector under Performance to find out what pages your users cannot find.

Sources

2 Responses

  1. Cristobal says:

    This website is meticulously analyzed. I like the extent of information you share.

  2. Alica says:

    You possess a noteworthy talent for turning commonplace topics into intriguing and engrossing pieces of content. Kudos!

Leave a Reply to Cristobal Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents