WordPress Fundamentals & Core Concepts
1. What is the WordPress Loop?
The WordPress Loop is a fundamental PHP code block used in theme templates to display posts, pages, or custom post types. It iterates through each post returned by a query, making its data (title, content, author, date) available for display. The Loop typically starts with have_posts() to check for available posts and uses the_post() to set up post data for each iteration. It ensures consistent rendering of content according to the template hierarchy and specific post formats.
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
// Display post content here
the_title('<h1>', '</h1>');
the_content();
endwhile;
else :
_e( 'Sorry, no posts matched your criteria.', 'text-domain' );
endif;
?>
2. Explain Actions and Filters with examples.
Actions and Filters are WordPress's primary mechanisms for extending functionality without modifying core files. Actions allow you to inject custom code at specific points in WordPress's execution lifecycle. For example, wp_head or wp_footer. You use add_action() to hook into an action and do_action() to trigger it. Filters, conversely, allow you to modify data before WordPress saves it or displays it. For example, the_content or the_title. You use add_filter() to modify data and apply_filters() to run the filters.
// Example Action: Add custom script to footer
function my_custom_script_footer() {
echo '<script>console.log("Hello from footer!");</script>';
}
add_action( 'wp_footer', 'my_custom_script_footer' );
// Example Filter: Modify post title
function my_custom_title_filter( $title ) {
return 'Custom: ' . $title;
}
add_filter( 'the_title', 'my_custom_title_filter' );
3. What are Custom Post Types (CPTs) and when would you use them?
Custom Post Types (CPTs) allow developers to create new types of content beyond the default Posts and Pages. They are integral for structuring specific data, such as "Products," "Events," "Testimonials," or "Portfolios." CPTs behave similarly to regular posts, supporting custom fields, taxonomies, and templates. You would use CPTs when your content requires a distinct structure, management interface, or display logic separate from generic blog posts. This improves content organization, maintainability, and scalability for complex sites.
<?php
function register_my_cpt_product() {
$args = array(
'labels' => array( 'name' => 'Products', 'singular_name' => 'Product' ),
'public' => true,
'has_archive' => true,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'rewrite' => array( 'slug' => 'products' ),
);
register_post_type( 'product', $args );
}
add_action( 'init', 'register_my_cpt_product' );
?>
4. Differentiate between a Page and a Post.
| Feature | Post | Page |
|---|---|---|
| Purpose | Blog entries, timely content | Static content, timeless information |
| Hierarchy | Chronological, categories, tags, author | Hierarchical (parent/child) |
| Comments | Enabled by default | Disabled by default |
| RSS Feed | Included in RSS feeds | Not included in RSS feeds |
| Template | Uses single.php, archive.php, index.php | Uses page.php, or custom page templates |
Posts are dynamic, time-sensitive content organized chronologically, often with categories and tags. They are primarily used for blogs, news, or articles. Pages are static, hierarchical content for timeless information like "About Us," "Contact," or "Privacy Policy." Pages lack categories/tags but can have parent/child relationships and custom templates.
5. How do you include JavaScript and CSS files correctly in WordPress?
JavaScript and CSS files must be included using WordPress's enqueue system: wp_enqueue_script() for JavaScript and wp_enqueue_style() for CSS. This system manages dependencies, handles versioning, prevents conflicts, and ensures optimal loading order. Files should be enqueued within a function hooked to wp_enqueue_scripts for frontend, or admin_enqueue_scripts for backend. This is crucial for theme and plugin compatibility, allowing other developers to easily dequeue or modify enqueued assets.
<?php
function my_theme_scripts() {
wp_enqueue_style( 'my-style', get_stylesheet_directory_uri() . '/css/my-style.css', array(), '1.0.0', 'all' );
wp_enqueue_script( 'my-script', get_template_directory_uri() . '/js/my-script.js', array('jquery'), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'my_theme_scripts' );
?>
6. Describe the WordPress template hierarchy.
The WordPress template hierarchy is the logical order WordPress uses to determine which template file to load for a specific page request. When a user requests a URL, WordPress identifies the query type (e.g., single post, archive, page, search result) and then searches for template files in a predefined order within the active theme. For example, for a single post, it might check single-{post-type}-{slug}.php, then single-{post-type}.php, single.php, singular.php, and finally index.php. Understanding this hierarchy is essential for effective theme development and customizability.
Plugin & Theme Development
7. Outline the basic directory structure of a WordPress plugin.
A WordPress plugin typically resides in wp-content/plugins/ within its own directory. The minimum requirement is a main PHP file directly inside this directory, containing the plugin header (name, description, author, version). For larger plugins, a common structure includes:
plugin-name/plugin-name.php(main plugin file with header)includes/(for core functionality, class definitions)admin/(for backend-specific code, settings pages)public/(for frontend-specific code, shortcodes, widgets)assets/(for CSS, JS, images)templates/(for outputting HTML)languages/(for translation files)
8. How do you create a custom shortcode?
To create a custom shortcode, you define a PHP function that returns the desired output, and then register this function with WordPress using add_shortcode(). Shortcodes allow users to embed dynamic content or specific layouts into posts, pages, or widgets using simple tags like [my_shortcode] or [my_shortcode attribute="value"]. The function can accept attributes ($atts) and enclosed content ($content), which you parse using shortcode_atts() to set default values.
<?php
function my_custom_shortcode_function( $atts, $content = null ) {
$atts = shortcode_atts(
array(
'title' => 'Default Title',
'color' => 'blue',
),
$atts,
'my_shortcode'
);
return '<div style="color: ' . esc_attr($atts['color']) . ';">' . esc_html($atts['title']) . ': ' . do_shortcode($content) . '</div>';
}
add_shortcode( 'my_shortcode', 'my_custom_shortcode_function' );
?>
9. Explain the purpose of wp_enqueue_script() and wp_enqueue_style().
wp_enqueue_script() and wp_enqueue_style() are WordPress functions designed to safely and efficiently add JavaScript and CSS files to the frontend or backend of a website. Their primary purpose is to:
- Manage Dependencies: Define which scripts/styles depend on others, ensuring they load in the correct order.
- Prevent Duplication: Avoid loading the same file multiple times, reducing page size and load times.
- Handle Versioning: Append version numbers to filenames, aiding cache busting during updates.
- Allow Dequeueing: Enable themes or plugins to remove scripts/styles enqueued by others if needed.
- Location Control: Specify whether scripts load in the header or footer.
10. What is a Child Theme and why is it important?
A Child Theme is a theme that inherits the functionality and styling of another theme, called the parent theme. It's placed in a separate directory and linked to its parent via a specific header in its style.css file. Child themes are crucial for customization because they allow you to modify a theme's appearance or add functionality without altering the parent theme's files directly. This ensures that when the parent theme is updated, your customizations are preserved, preventing loss of work and simplifying theme maintenance.
/* style.css within a child theme */
/*
Theme Name: My Child Theme
Theme URI: https://example.com/my-child-theme/
Description: My first child theme
Author: John Doe
Author URI: https://example.com
Template: twentytwentythree
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-child-theme
*/
11. How do you add custom meta boxes to a post type?
To add custom meta boxes, you use the add_meta_box() function hooked to the add_meta_boxes action. This function takes the meta box ID, title, a callback function (which renders the meta box content), the screen (post type), context (normal, advanced, side), and priority. Inside your callback function, you'll output HTML form fields. To save the data, you hook into save_post, verify the nonce, check user permissions, and then use update_post_meta() to store the field values in the database.
<?php
// Add the meta box
function my_custom_meta_box() {
add_meta_box(
'my_meta_box_id',
'Additional Product Info',
'my_meta_box_callback',
'product', // Custom Post Type 'product'
'normal',
'high'
);
}
add_action( 'add_meta_boxes', 'my_custom_meta_box' );
// Meta box callback function
function my_meta_box_callback( $post ) {
wp_nonce_field( basename(__FILE__), 'my_meta_box_nonce' );
$value = get_post_meta( $post->ID, '_my_product_price', true );
echo '<label for="product_price">Price:</label>';
echo '<input type="text" id="product_price" name="product_price" value="' . esc_attr( $value ) . '">';
}
?>
12. What are Transients and how do they improve performance?
Transients are a simple, standardized way to cache temporary data in the WordPress database, with an expiration time. They are essentially key-value pairs stored in the wp_options table but designed for time-sensitive data. You use set_transient() to store data and get_transient() to retrieve it. If the data is expired or not found, you regenerate it and save it again. Transients improve performance by reducing the number of expensive database queries or API calls, displaying cached data until it expires or is explicitly cleared, thus speeding up page load times.
Advanced Development & API
13. Describe the WordPress REST API and provide a basic example of its usage.
The WordPress REST API provides an interface for applications to interact with WordPress data programmatically over HTTP. It exposes WordPress content (posts, pages, users, comments, custom post types) as JSON objects, making it ideal for building decoupled applications, mobile apps, or integrating with other services. The default base URL is usually /wp-json/wp/v2/. You can perform CRUD operations (Create, Read, Update, Delete) using standard HTTP methods (GET, POST, PUT, DELETE) on various endpoints.
Example: Fetching the latest posts.
GET /wp-json/wp/v2/posts?per_page=3&_fields=id,title,link
This request fetches the 3 most recent posts, returning only their ID, title, and link, as an array of JSON objects.
14. How do you register a custom REST API endpoint?
To register a custom REST API endpoint, you use the register_rest_route() function, typically hooked into the rest_api_init action. This function requires:
- Namespace: A unique string (e.g.,
myplugin/v1). - Route: The specific path for your endpoint (e.g.,
/products/(?P<id>\d+)). - Arguments Array: Defines the HTTP methods (GET, POST), callback function to handle the request, and permission callback to control access. This allows you to expose custom data or perform specific actions beyond the default endpoints.
<?php
function my_register_custom_rest_endpoint() {
register_rest_route( 'myplugin/v1', '/products', array(
'methods' => 'GET',
'callback' => 'my_get_products_callback',
'permission_callback' => '__return_true', // For public access, or add custom logic
) );
}
add_action( 'rest_api_init', 'my_register_custom_rest_endpoint' );
function my_get_products_callback( $request ) {
// Example: Fetch custom post type 'product' posts
$args = array( 'post_type' => 'product', 'posts_per_page' => -1 );
$products = get_posts( $args );
$data = array();
foreach( $products as $product ) {
$data[] = array(
'id' => $product->ID,
'title' => $product->post_title,
'price' => get_post_meta( $product->ID, '_my_product_price', true ),
);
}
return new WP_REST_Response( $data, 200 );
}
?>
15. Explain WordPress Hooks and their execution order.
WordPress Hooks (Actions and Filters) are functions that allow developers to modify or extend WordPress functionality at specific points during its execution without altering core files. They are essentially points in the code where you can "hook in" your own custom functions.
- Actions (
do_action(),add_action()) trigger functions at specific events. - Filters (
apply_filters(),add_filter()) modify data before it's used or displayed. The execution order is primarily determined by the order in which WordPress itself callsdo_action()orapply_filters(), and the priority argument passed toadd_action()oradd_filter(). Lower priority numbers execute earlier (default is 10). If priorities are the same, functions are executed in the order they were added.
16. What is WordPress CLI and provide common commands?
WordPress CLI (Command Line Interface) is a powerful tool that allows you to manage your WordPress installations directly from the command line. It streamlines development, maintenance, and deployment tasks, offering a faster and more efficient alternative to the WordPress admin dashboard for many operations. Common commands include:
wp core download: Downloads WordPress core files.wp config create: Generateswp-config.php.wp db create: Creates the database.wp core install: Installs WordPress.wp plugin install <plugin-slug> --activate: Installs and activates a plugin.wp theme update --all: Updates all themes.wp post create --post_type=post --post_title="My New Post": Creates a new post.wp user list: Lists all users.
17. Discuss WordPress database structure and common tables.
WordPress uses a MySQL database to store all its content and settings. The default tables are prefixed with wp_ (configurable). Understanding the structure is crucial for direct database interactions or debugging.
Common tables:
wp_posts: Stores post content, pages, custom post types, and revisions.wp_postmeta: Stores custom fields (meta data) for posts.wp_users: Stores user accounts.wp_usermeta: Stores custom user data.wp_comments: Stores comments.wp_commentmeta: Stores custom comment data.wp_terms: Stores categories, tags, and custom taxonomies.wp_term_relationships: Links objects (posts) to terms.wp_term_taxonomy: Describes taxonomies for terms.wp_options: Stores general settings, plugin options, and transients.
18. What is Object Caching in WordPress and how does it differ from page caching?
Object Caching is a method of storing results of database queries or computations in memory (e.g., Memcached, Redis) so that subsequent requests for the same data can be served quickly without hitting the database or re-computing. WordPress has an internal object cache that can be persisted by an external solution. It differs from page caching in scope:
- Page Caching stores the entire HTML output of a rendered page, serving it directly to users, bypassing PHP and database entirely. It's frontend-focused.
- Object Caching caches specific data objects (e.g., post objects, user data, query results) internally, reducing database load and PHP execution time, but still requiring PHP processing to assemble the page. It's backend-focused.
Performance, Security & DevOps
19. List common WordPress security best practices.
- Strong Passwords & Unique Usernames: Enforce complex passwords for all users, especially administrators. Avoid "admin" username.
- Regular Updates: Keep WordPress core, themes, and plugins updated to patch vulnerabilities.
- Reputable Sources: Only download themes and plugins from trusted sources.
- Security Plugin: Use a reputable security plugin (e.g., Wordfence, Sucuri) for firewalls, malware scanning, and login protection.
- Two-Factor Authentication (2FA): Enable 2FA for all administrative users.
- Limit Login Attempts: Prevent brute-force attacks.
- Database Prefix: Change the default
wp_database prefix during installation. - Disable File Editing: Add
define('DISALLOW_FILE_EDIT', true);towp-config.php. - SSL/HTTPS: Ensure all traffic uses HTTPS.
- Regular Backups: Implement a reliable backup strategy.
20. How would you optimize a WordPress site for performance?
Performance optimization involves several layers:
- Caching: Implement page caching (e.g., WP Super Cache, LiteSpeed Cache) and object caching (Memcached, Redis).
- Image Optimization: Compress and lazy-load images. Use modern formats like WebP.
- Minification & Concatenation: Minify CSS/JS and combine them where possible to reduce HTTP requests.
- CDN (Content Delivery Network): Serve static assets globally from edge locations.
- Database Optimization: Regularly clean and optimize the database (revisions, transients, spam comments).
- Efficient Code: Use optimized theme/plugin code, avoid bloated plugins, and perform efficient database queries.
- PHP Version: Use the latest stable PHP version (PHP 8.x in 2026).
- Server Optimization: Use a fast web server (Nginx over Apache for static content), sufficient RAM, and SSD storage.
21. Explain WordPress Multisite and its use cases.
WordPress Multisite is a feature that allows a single WordPress installation to host multiple independent websites from a shared WordPress codebase and database. Each site in the network shares the same WordPress files but has separate content, users, and settings within the same database, distinguished by table prefixes. Use cases include:
- University Networks: Managing multiple departmental websites.
- Company Intranets: Providing internal sites for different teams.
- Client Management: Hosting multiple client sites on a single installation (often with custom development for isolation).
- Blog Networks: Running several blogs under one umbrella. It simplifies updates and management for many sites but requires careful planning for security, performance, and plugin compatibility.
22. How do you handle localization and internationalization in WordPress?
Internationalization (i18n) is the process of preparing your code to be translatable, primarily by wrapping translatable strings in specific WordPress functions. Localization (l10n) is the actual translation of those strings into different languages. Steps:
- Text Domain: Define a unique
Text Domainin your theme/plugin header. - String Wrapping: Use
__()for translated strings,_e()for echoed strings,_n()for plural forms, and_x()for strings with context. - Load Text Domain: Use
load_theme_textdomain()orload_plugin_textdomain()to load the translation files (.mo,.po). - Translation Files: Create
.poand.mofiles for each language using tools like Poedit, based on.pot(Portable Object Template) files generated from your code.
<?php
// Load text domain in functions.php or main plugin file
function my_theme_setup() {
load_theme_textdomain( 'my-theme', get_template_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'my_theme_setup' );
// Example usage
echo esc_html__( 'Hello World!', 'my-theme' );
printf( esc_html__( 'There are %d items.', 'my-theme' ), 5 );
?>
23. Describe different caching layers used in WordPress and their benefits.
| Caching Layer | Description | Benefits |
|---|---|---|
| Browser Caching | Stores static assets (images, CSS, JS) locally on user's browser. | Reduces repeated downloads for returning visitors, faster subsequent page loads. |
| CDN Caching | Global network of servers serving static assets from closest edge location. | Speeds up asset delivery worldwide, reduces load on origin server. |
| Page Caching | Stores the full HTML output of generated pages, serving it directly. | Drastically reduces server load, eliminates PHP/DB processing for cached pages, very fast. |
| Object Caching | Caches database query results and computed data in memory (Redis, Memcached). | Reduces database load, speeds up PHP execution, beneficial for dynamic content. |
| OPcache | Caches compiled PHP opcode in memory, bypassing recompilation on each request. | Significant improvement in PHP execution speed, core performance boost. |
24. What are common challenges when scaling a high-traffic WordPress site?
Scaling a high-traffic WordPress site often involves addressing bottlenecks related to:
- Database Load: High query volume can overwhelm MySQL. Solutions include database replication (read replicas), sharding, and robust object caching.
- PHP Processing: Each request typically runs PHP. Optimizations include aggressive page caching, load balancing across multiple web servers, and fast PHP interpreters (PHP-FPM, latest PHP versions).
- Static Asset Delivery: Images, CSS, JS can consume bandwidth. CDNs are essential.
- Concurrency: Handling many concurrent users requires robust web servers (Nginx), load balancers, and container orchestration (Kubernetes).
- Plugin/Theme Bloat: Inefficient code can negate scaling efforts. Careful selection and custom development are crucial.
- Security: High traffic can attract more attacks, requiring stronger WAFs and intrusion detection.
Modern WordPress & System Design
25. Explain the concept of the Block Editor (Gutenberg) and its core components.
The Block Editor, commonly known as Gutenberg, is WordPress's modern, block-based editor. It redefines content creation by treating every piece of content (paragraphs, images, headings, custom elements) as a modular "block." This visual, drag-and-drop interface provides more flexibility and control over layout without coding. Core components:
- Blocks: Individual content units (Paragraph, Image, Heading, Custom Block).
- Block API: JavaScript API (React-based) for registering and defining custom blocks.
- Block Editor Canvas: The main editing area where blocks are added and arranged.
- Sidebar Settings: Inspector controls for block-specific settings and general document settings.
- Patterns: Predefined arrangements of blocks that can be easily inserted.
26. How do you create a custom Gutenberg block?
Creating a custom Gutenberg block involves using JavaScript and the Block Editor's API, typically built with React.
block.json: A metadata file that defines the block's attributes, category, keywords, and points to theeditorScriptandstylefiles.edit.js: Contains the React component for the block's editing interface in the Block Editor. It defines how the block looks and behaves when being edited.save.js: Contains the React component for the block's saved output, which is rendered on the frontend.- PHP Registration: A PHP file uses
register_block_type()to link theblock.jsonto WordPress, making the block available. Modern development uses@wordpress/create-blockscaffolding tool.
<?php
// In a plugin or theme's functions.php
function my_custom_block_init() {
register_block_type( __DIR__ . '/blocks/my-example-block' ); // Points to block.json
}
add_action( 'init', 'my_custom_block_init' );
// Example block.json content (simplified)
/*
{
"apiVersion": 2,
"name": "my-plugin/my-example-block",
"title": "My Example Block",
"category": "text",
"editorScript": "file:./block.js"
}
*/
?>
27. What is Full Site Editing (FSE) and how does it change theme development?
Full Site Editing (FSE) is a suite of features in WordPress that extends the Block Editor's capabilities to manage the entire website layout, not just post or page content. It allows users to visually edit headers, footers, navigation, templates, and global styles using blocks, without needing to code. It changes theme development significantly:
- Block Themes: Themes are now "block themes" (or hybrid themes), built entirely with blocks and
theme.jsonfor global styles, moving away from traditional PHP template files for structure. theme.json: This file defines global styles, block settings, and typography, replacing much offunctions.phpandstyle.cssfor theme customization.- Template Editing: Users can edit site-wide templates (
index.html,single.html,archive.html) directly within the editor using blocks. - Less PHP, More HTML/JSON/JS: Theme development shifts towards defining block patterns, reusable block templates, and JSON configurations.
28. Discuss Headless WordPress: what it is, pros, and cons.
Headless WordPress (or decoupled WordPress) uses WordPress purely as a content management system (CMS) and API, while a separate frontend application (built with frameworks like React, Vue, Next.js) consumes content via the REST API or GraphQL. WordPress serves as the "head" (admin panel, database), but the "body" (frontend presentation) is handled by a different technology stack. Pros:
- Performance: Faster frontend rendering and specialized optimizations.
- Flexibility: Use any frontend technology, better suited for mobile apps, IoT.
- Scalability: Separate frontend and backend can scale independently.
- Security: Frontend is less susceptible to WordPress-specific vulnerabilities. Cons:
- Complexity: Requires more development expertise (frontend + backend).
- Cost: Higher development and maintenance costs.
- Feature Parity: Loses some WordPress ecosystem features (plugins may not work out-of-the-box for frontend).
- SEO Challenges: Requires careful handling of SEO on the client-side.
29. How would you debug a performance issue on a live WordPress site?
- Activate Debugging: Enable
WP_DEBUG,WP_DEBUG_LOG, andSAVEQUERIESinwp-config.phpto log errors and database queries. - Profiling Tools: Use server-side profiling tools (e.g., New Relic, Blackfire.io) or Xdebug to identify slow functions, database queries, and PHP execution times.
- Browser Developer Tools: Inspect network requests, waterfall charts, and console errors to identify slow-loading assets, render-blocking resources, or client-side issues.
- Plugin/Theme Conflict Check: Deactivate plugins one by one, then switch to a default theme, to isolate the source of the issue.
- Database Analysis: Use tools like Query Monitor (plugin) to analyze database queries and identify inefficient ones. Use
wp-cli db optimize. - Server Logs: Check web server (Apache/Nginx) and PHP-FPM error logs for critical issues.
- Caching Review: Verify caching layers are correctly configured and invalidate caches if needed.
// In wp-config.php for debugging
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true ); // Logs errors to wp-content/debug.log
define( 'WP_DEBUG_DISPLAY', false ); // Prevents errors from showing on frontend
define( 'SAVEQUERIES', true ); // Saves database queries for analysis
30. You need to migrate a WordPress site to a new server. Outline the steps.
Migrating a WordPress site involves moving its files and database.
- Backup Everything: Perform a full backup of the existing WordPress files (
wp-content, core files) and export the entire database using phpMyAdmin orwp-cli db export. - Set up New Server: Configure the web server (Apache/Nginx), PHP, and MySQL on the new server. Create a new database and a database user.
- Transfer Files: Upload the backed-up WordPress files to the new server's web root.
- Import Database: Import the database dump into the newly created database on the new server.
- Update
wp-config.php: Editwp-config.phpon the new server to reflect the new database name, username, password, and host. - Update URLs: Crucially, update the
siteurlandhomeoptions in thewp_optionstable (or use a migration plugin/wp-cli search-replace) to point to the new domain/URL. - Test Thoroughly: Verify all pages, posts, images, and functionality work correctly.
- DNS Update: Change DNS records to point the domain to the new server's IP address.
Quick revision table
| Topic | One-line answer | Common follow-up |
|---|---|---|
| WordPress Loop | Iterates through post data in templates. | How to customize query for specific posts? |
| Actions vs. Filters | Actions trigger code, Filters modify data. | When to use do_action vs apply_filters? |
| Custom Post Types | Structured content types beyond posts/pages. | How to add custom fields to a CPT? |
| Enqueue Scripts/Styles | wp_enqueue_script/style for dependency management. | How to dequeue a script added by another plugin? |
| Child Theme | Inherits parent theme; preserves customizations on update. | What happens if a child theme doesn't have functions.php? |
| WordPress REST API | Programmatic access to WP content via HTTP/JSON. | How to secure a custom REST endpoint? |
| WordPress CLI | Command-line tool for WP management. | Can you manage users with WP-CLI? |
| Object Caching | Caches database queries/computations in memory. | How does it differ from page caching? |
| Gutenberg Blocks | Modular content units for visual editing. | What's block.json for? |
| Full Site Editing | Block-based control over entire site templates/styles. | How does theme.json work? |
| Headless WordPress | Decoupled WP backend, separate frontend. | What are the SEO implications? |
| Performance Debugging | Use debug logs, profiling tools, browser dev tools. | How to identify a slow plugin? |
How to prepare
- Deep Dive into Core Concepts: Master the WordPress Loop, Actions, Filters, Custom Post Types, and the Template Hierarchy. These are foundational for any WordPress role.
- Practice Plugin/Theme Development: Build a simple plugin and a child theme from scratch. Focus on using
wp_enqueue_script/style, shortcodes, and custom meta boxes correctly. - Explore the REST API: Experiment with fetching and creating data using default and custom REST API endpoints. Understand how it enables decoupled architectures.
- Familiarize with Modern WP (Gutenberg/FSE/Headless): Understand the Block Editor's architecture, Full Site Editing concepts, and the rationale behind Headless WordPress. Be ready to discuss
theme.jsonand block development fundamentals. - Focus on Performance & Security: Be able to articulate common vulnerabilities, best practices for securing a site, and a structured approach to identifying and resolving performance bottlenecks.
