How to develop a WordPress child theme without risks?
Start with a concrete scenario: you have a theme that works well, but you need to customize a page, add a script, or modify a template. If you touch the parent theme files, you lose everything on the next update. The solution is the child theme. At Meteora Web, we consider it mandatory on every custom project.
A child theme is a minimal folder that inherits styles and functionality from the parent theme but lets you override only what you need. Recommended structure:
/wp-content/themes/your-child-theme/
│ style.css (with Template: parent-theme-name)
│ functions.php
│ screenshot.pngYour style.css must have the correct header:
/*
Theme Name: Child Name
Template: parent-theme-name
*/In functions.php load the parent style with wp_enqueue_style and then add your overrides. Never use @import in CSS: it slows down rendering. This approach gives you a safe environment for modifications and updates. What to do now: if you don't have a child theme, create one in 10 minutes. Your site will thank you.
Why Custom Post Types and Taxonomies are the foundation of a flexible CMS?
WordPress was born for blogging, but with Custom Post Types (CPT) and custom taxonomies it becomes an enterprise CMS. Using plugins like Custom Post Type UI is convenient, but we prefer to register CPTs directly in the theme or a must-use plugin. This ensures better performance and no lock-in if the plugin is deactivated.
Registering a "Product" CPT with a "Product Category" taxonomy can be done with register_post_type() and register_taxonomy() inside a function hooked to init. Example:
function create_product_cpt() {
register_post_type('product', array(
'labels' => array('name' => 'Products', 'singular_name' => 'Product'),
'public' => true,
'has_archive' => true,
'supports' => array('title', 'editor', 'thumbnail'),
'rewrite' => array('slug' => 'products')
));
}
add_action('init', 'create_product_cpt');To add a custom meta box (e.g., "Price") use add_meta_box and save with save_post. This frees you from extra plugins and makes the data native. Common mistake: forgetting to flush permalinks after changing slugs. Go to Settings -> Permalinks and click "Save" without changes to flush rewrite rules. What to do now: analyze the information structure of your project and register CPTs without plugins. A few minutes of code, years of flexibility.
Sponsored Protocol
How to use the WordPress REST API for headless applications?
The WordPress REST API turns your site into a pure backend for React, Vue, or mobile apps. It's native since 4.7, and we used it to build a reservation app for a gym: frontend in Vue, data via API, zero custom PHP pages.
Base endpoint: /wp-json/wp/v2/posts. You can extend the API by registering custom routes with register_rest_route() in functions.php. Example to read products with price:
add_action('rest_api_init', function () {
register_rest_route('my/v1', '/products/(?P<id>\d+)', array(
'methods' => 'GET',
'callback' => function ($data) {
$post = get_post($data['id']);
$price = get_post_meta($data['id'], '_price', true);
return array('title' => $post->post_title, 'price' => $price);
},
'permission_callback' => '__return_true'
));
});Watch out for security: never expose sensitive data with __return_true in production. Use JWT or OAuth authentication. We prefer JWT via the JWT Authentication for WP-API plugin (or develop our own endpoint). What to do now: if you need to integrate WordPress with a modern frontend, start with the native endpoints: test them with curl or Postman. Then extend as needed.
How to create custom Gutenberg blocks with React?
Gutenberg is not just a text editor. With custom blocks you can create visual components for your clients. We have built blocks for product grids, interactive maps, and dynamic call-to-actions.
To develop a block you need modern JavaScript (React). The easiest way is to use @wordpress/create-block from the command line:
Sponsored Protocol
npx @wordpress/create-block block-name
cd block-name
npm startThis generates a scaffold with src/index.js (block definition) and src/edit.js (React editor). A basic block for a box with customizable title:
import { registerBlockType } from '@wordpress/blocks';
import { RichText } from '@wordpress/block-editor';
registerBlockType('my/box', {
title: 'Box',
icon: 'admin-page',
category: 'layout',
attributes: { content: { type: 'string' } },
edit: ({ attributes, setAttributes }) => (
<RichText value={attributes.content} onChange={(v) => setAttributes({content: v})} />
),
save: ({ attributes }) => (<div className="box">{attributes.content}</div>)
});Note: the save must return static HTML, not React, to ensure content portability. For dynamic blocks (live data), use render_callback in PHP. What to do now: install Node.js, create a simple block and test it. The time invested in custom blocks pays off in editorial flexibility.
How to leverage WordPress hooks to modify anything?
Hooks (actions and filters) are the modular heart of WordPress. Without touching core files, you can modify output, add functionality, or integrate external services. We use them daily: for example, we added an extra field to WooCommerce checkout with woocommerce_after_order_notes.
Actions run functions at specific points in the WordPress cycle. Filters modify values before output. Classic example: add a custom "Read More" to the post excerpt:
add_filter('excerpt_more', function($more) {
return '... <a href="'.get_permalink().'">Read more</a>';
});To remove a default style (e.g., from a plugin), use remove_action or remove_filter with correct priority. Best practice: declare your hooks in the child theme's functions.php, grouped by functionality. Avoid anonymous callbacks if you need to remove them. What to do now: open your functions.php and find at least one hook to improve the site. The WordPress documentation has the full list.
Sponsored Protocol
WP-CLI: why the command line speeds up development?
WP-CLI is a command-line interface for managing WordPress: installations, updates, cron, users, search-replace in the database. We use it every day for deployments and maintenance. A real example: we had to migrate a multisite with 30 subdomains. With wp search-replace we changed the old domain to new in seconds.
Essential commands:
# Install WordPress
wp core download --locale=en_US
wp config create --dbname=mydb --dbuser=root --dbpass=
wp db create
wp core install --url=example.com --title=MySite --admin_user=admin --admin_password=pass --admin_email=email@example.com
# Update plugins and themes
wp plugin update --all
wp theme update --all
# Delete cache transients
wp transient delete --allCaution: use wp search-replace only on non-serialized tables, or pass --skip-columns=meta_value to avoid corruption. What to do now: install WP-CLI on your server or locally from wp-cli.org. Try running wp core version. Productivity triples.
WordPress Multisite: when and how to configure it for domains and subdomains?
Multisite allows you to manage multiple sites from a single WordPress installation. We used it for a network of local stores of a clothing brand: each store had its own subdomain (e.g., rome.mybrand.com) with shared themes and plugins but separate content.
To enable it, add define('WP_ALLOW_MULTISITE', true); in wp-config.php. Then go to Tools -> Network and choose between subdomains or subdirectories. After configuration, edit .htaccess and wp-config.php as instructed. When does it make sense? If you manage multiple sites with the same theme/plugin base and want centralized updates. Avoid it if sites have independent performance needs or incompatible plugins.
Common issue: caching plugins often don't handle multisite well. Use a per-site cache approach with Redis or WP Rocket configured per domain. What to do now: evaluate if your project can benefit from a centralized installation. If yes, follow the official documentation.
Sponsored Protocol
How to optimize WordPress performance (caching, database, CDN)?
A slow site loses visitors and revenue. We always start with analysis: Google PageSpeed, GTmetrix. Then we work on three fronts: caching (server-side with Varnish or plugins like WP Rocket, browser cache), image optimization (WebP with automatic conversion), database (clean revisions, expired transients, indexes).
Real example: an e-commerce client had images at 3 MB each. By optimizing them with lossless compression, we reduced weight by 60% without quality loss, and load time dropped from 6 to 2 seconds. For the database, periodically run:
DELETE FROM wp_posts WHERE post_type = 'revision';
OPTIMIZE TABLE wp_postmeta, wp_options;Or use WP-CLI: wp db optimize. A CDN like Cloudflare or BunnyCDN accelerates global distribution. Caution: server cache must be configured to exclude checkout and dynamic pages. What to do now: test your site with PageSpeed, follow suggestions, and consider a server-side caching service. No expensive hardware needed if software is optimized.
What are the most common vulnerabilities and how to protect a WordPress site?
Security in WordPress is often underestimated. Typical vulnerabilities we see: XSS in outdated plugins, SQL injection in poorly written queries, brute force on login, wrong file permissions. Our hardening checklist:
- Disable XML-RPC if not used (add
add_filter('xmlrpc_enabled', '__return_false');) - Change table prefix from
wp_to something unique (only on new installation) - Limit login attempts with plugin like Limit Login Attempts Reloaded
- Set file permissions 644, directories 755 and block PHP execution in /wp-content/uploads via .htaccess
- Enable HTTPS with correctly configured certificate (no redirect loops)
- Regular backups with offsite storage (e.g., S3 or encrypted FTP)
Real case: a client server's SSL certificate renewal had expired. We manually intervened and automated with certbot renew and cron, solving without downtime. What to do now: run a security audit on your WordPress. If you haven't, start with the official hardening guide.
Sponsored Protocol
WordPress headless: is it right for your project?
Headless WordPress means using WordPress only as a CMS backend and a modern frontend (React, Vue, Next.js) for the public interface. We have built headless platforms for clients who wanted a fast SPA and an easy editing experience for content managers.
Advantages: better performance (static frontend, serverless), design flexibility, reactive user experience. Disadvantages: higher development complexity (routing, SEO, state rehydration), double hosting costs, and more maintenance.
When to choose it? If you have advanced user experience needs (hybrid mobile app, heavy animations, multi-source data). For a standard business site, a traditional WordPress with a good custom theme and caching is often faster to build and manage. What to do now: evaluate your project: if the frontend is simple, stick with classic WordPress. If you need a web app, then headless is the way. At Meteora Web we recommend starting with a proof-of-concept before investing resources.
What to do now: next practical steps
We've seen that advanced WordPress development is not just code: it's architectural choices, tool knowledge, and attention to detail. Here are concrete actions you can take immediately:
- Create a child theme for every custom theme: it protects updates.
- Register CPTs and taxonomies without plugins: more control and performance.
- Experiment with WP-CLI: run one command a day to get comfortable.
- Run a security audit following the checklist above.
- Measure performance of your site and apply at least one optimization (images, caching).
If these concepts seem complex, don't worry. At Meteora Web we have been accompanying businesses since 2017 from consultancy to implementation: a single point of contact for domain, hosting, development, and maintenance. We always start from the concrete problem and the client's numbers, because a site is measured in revenue, not compliments.