WordPress core concepts

This article is meant to give you a general overview on the most important WordPress concepts & a general overview of how the CMS works.

This article is for developers who are looking to get a general overview over WordPress, but might also be suitable to you if you are not an advanced users.

Important files/directories

wp-config.php – located at web root

This files holds the credentials for your database & other configurations such as dbugging.  Beyond that this files is often used by plugins to store sensitive information such as API keys, as it is the simplest straightforward option, but not necessarily the safest.

/wp-content/

Directory that holds all your relevant content: Theme, Uploads & Plugins. You can migrate you whole website with just the database and the wp-content directory.

functions.php – wp-content/themes/[theme_name]/

Used to add custom functionalities. More complex functionalities should be created as plugins in wp-content/plugins/

Important concepts

Theme/ Child Theme

Themes define custom styles and some functionalities. Every wp site requires a theme. You can either create a custom theme from scratch or use a child theme.

Reasons to use child theme:

  • Make your modifications portable and replicable.
  • Keep customizations separate from the parent theme.
  • Allow parent themes to be updated without losing your modifications.
  • Save on development time since you’re only writing the code you need.
  • Are a great way to start your journey toward developing full themes.

Post Types

Post types are a way of categorising content in WordPress.
The best-known default post types are “post” and “page”, but you can create custom post types for your website i.e. “projects” or “services”. You can customise the capabilities of your post types.

All post types are stored in the wp_post table in the database.

WordPress default post types are:

  • Post (Post Type: ‘post’)
  • Page (Post Type: ‘page’)
  • Attachment (Post Type: ‘attachment’)
  • Revision (Post Type: ‘revision’)
  • Navigation menu (Post Type: ‘nav_menu_item’)
  • Block templates (Post Type: ‘wp_template’)
  • Template parts (Post Type: ‘wp_template_part’)

Taxonomies

Each taxonomy consist of term in either hierarchical or non-hierarchical structure. The WordPress default taxonomies are categories (hierarchical) tags (non-hierarchical).

Plugins

Custom functionalities you can add to your website. Custom plugins can be added in wp-content/plugins and standard plugins can be added through the WordPress plugin directory in your dashboard.

Database

WordPress operates with a SQL database that stores all the data.

Important Tables:

Other Tables

  • wp_usermeta - Stores metadata about users (roles, capabilities, preferences).
  • wp_termmeta - Stores metadata for terms (categories, tags, or custom taxonomy terms).
  • wp_terms - Stores individual taxonomy terms (like “Category: News” or “Tag: WordPress”).
  • wp_term_relationships - Links posts (or other objects) to taxonomy terms.
  • wp_term_taxonomy - Defines the taxonomy type for each term (category, tag, or custom taxonomy) and counts associated objects.
  • wp_comments - Stores comments submitted on posts/pages.
  • wp_commentmeta - Stores metadata related to comments.

Hooks (Actions & Filters)

Filters are used to modify information, and actions are used to execute actions. Both need to be triggered by built in hooks. Common hooks are wp_footer or wp_head. There are hundreds of hooks, which are used to add custom scripts & stylesheets. Plugins can create custom hooks.

Additional Concepts:

Other concepts that might be worth looking at:

  • Widgets
  • Short codes
  • REST API / AJAX References

WordPress Security

I would look at the security in 3 layers:

  1. Layer one is your DNS – use a proxy like cloudflare to block malicious traffic before it visits your server. This also keeps you IP address secured from attackers.
  2. Layer two is your server – make sure that your (1)file permissions are secure,  perhaps use a (2)custom plugin on plesk or cpanel to secure your server and (3)keep your server languages & systems updated.
  3. Layer three is your site – run regular updates, use a good firewall plugin, keep plugins to a minimum,

Server Security

  1. Good quality webhosting
  2. KEEP BACKUPS in a separate location
  3. Keep your file permissions secure, limit the files you server can write in the case it gets compromised
  4. Create separate database users for each website, don’t share the database between websites
  5. Keep server languages up to date e.g. the php version (fully managed webhosts will do that for you)
  6. Prefer SFTP over FTP
  7. Assure that each website is isolated in case your server compromised
  8. Change the table prefix in your database from wp_ to something else
  9. Log activity – will allow you to see what happened when and which IP address was used
  10. Use SSL for your server

WordPress Security

  1. Limit the number of plugins
  2. Update plugins & theme(s)
  3. Add a firewall plugin to your site

Additional Security Advice

  1. Use a CDN like Cloudflare as a proxy between server and client to block threats before they each your server.
  2. Limit access to the site (especially for clients lol)

WordPress Rescources


Child Themes: https://developer.wordpress.org/themes/advanced-topics/child-themes/

Post Types: https://developer.wordpress.org/themes/classic-themes/basics/post-types/

Taxonomies: https://developer.wordpress.org/themes/classic-themes/basics/categories-tags-custom-taxonomies/

Hooks: https://developer.wordpress.org/plugins/hooks/

Custom Hooks: https://developer.wordpress.org/plugins/hooks/custom-hooks/

Security: https://developer.wordpress.org/advanced-administration/security/hardening/

Recent posts:

image

Fluent Forms geoplugin & ipinfo error

The Solution After notfying the Fluent Forms Team they realeased a hotfix withing 24hrs, which I greatly appreciate. Now the service is replaced with Google's API. You can obtain you API key at https://cloud.google.com/. The Issue If your form presents an error such as "Sorry! Please provide valid token for ipinfo.io in global settings" or […]

Postcode Distance Calculator FluentForm (Google Maps Distance Matrix API)

If you want your Fluent Forms WordPress form to automatically calculate travel distance based on a user’s postcode, and pass that distance to your emails or database, this step-by-step guide will help you set it up — using Google Maps Distance Matrix API for accurate distance calculation. Why Use Google Maps Distance Matrix API? Calculating […]

Fill post query in bricks with meta box relationship posts

When building dynamic WordPress sites with Bricks Builder, there are times when you want to display posts related through a Meta Box relationship field, but also ensure there’s a fallback to show other posts of the same type if no relationships exist. This can be especially helpful for things like testimonials, related articles, or services. […]

Start your project today

Get in touch
Contact Form
crosschevron-left