WordPress Interview Questions and Answers

Find 100+ WordPress interview questions and answers to assess candidates’ skills in theme and plugin development, CMS management, SEO, security, and performance optimization.
By
WeCP Team

As businesses rely heavily on content-driven websites, blogs, and eCommerce platforms, recruiters must identify WordPress professionals who can build, customize, and maintain scalable, secure, and high-performing websites. With expertise in themes, plugins, CMS configuration, and performance optimization, WordPress specialists power a large portion of the modern web.

This resource, "100+ WordPress Interview Questions and Answers," is tailored for recruiters to simplify the evaluation process. It covers a wide range of topics—from WordPress fundamentals to advanced customization and optimization, including themes, plugins, REST APIs, and security best practices.

Whether you're hiring WordPress Developers, CMS Specialists, Web Designers, or Content Platform Engineers, this guide enables you to assess a candidate’s:

  • Core WordPress Knowledge: WordPress architecture, themes vs plugins, posts vs pages, hooks (actions & filters), and admin configuration.
  • Advanced Skills: Custom theme and plugin development, Gutenberg blocks, REST API integration, performance optimization, SEO best practices, and security hardening.
  • Real-World Proficiency: Building custom WordPress sites, integrating third-party services, managing updates, handling migrations, and ensuring scalability and uptime.

For a streamlined assessment process, consider platforms like WeCP, which allow you to:

  • Create customized WordPress assessments tailored to development, design, or content-focused roles.
  • Include hands-on tasks such as theme customization, plugin debugging, or performance optimization scenarios.
  • Proctor exams remotely while ensuring integrity.
  • Evaluate results with AI-driven analysis for faster, more accurate decision-making.

Save time, enhance your hiring process, and confidently hire WordPress professionals who can build secure, scalable, and content-rich websites from day one.

WordPress Interview Questions

WordPress – Beginner (1–40)

  1. What is WordPress and what are its main features?
  2. What is the difference between WordPress.com and WordPress.org?
  3. What are themes in WordPress?
  4. What are plugins in WordPress?
  5. What is the WordPress Dashboard?
  6. How do you install a theme in WordPress?
  7. How do you install a plugin in WordPress?
  8. What is the difference between posts and pages?
  9. What is a WordPress widget?
  10. What are categories in WordPress?
  11. What are tags in WordPress?
  12. What is the Media Library in WordPress?
  13. What is a permalink?
  14. How do you change the site title and tagline?
  15. How do you create a menu in WordPress?
  16. What is Gutenberg (Block Editor)?
  17. What is the Classic Editor?
  18. How do you create a new post in WordPress?
  19. How do you enable or disable comments on a post?
  20. What is the Reading Settings screen used for?
  21. What is the Discussion Settings screen used for?
  22. What is a featured image?
  23. How do you create a static homepage in WordPress?
  24. What is a shortcode?
  25. How do you change the admin password in WordPress?
  26. What is a user role in WordPress?
  27. What is the difference between Administrator and Editor roles?
  28. What is the Trash feature in WordPress?
  29. How do you update themes and plugins?
  30. What is a child theme?
  31. What is the Appearance > Customize section used for?
  32. What is a slug in WordPress?
  33. How do you embed YouTube videos in WordPress?
  34. What is the default content type in WordPress?
  35. What is a favicon and how do you add it?
  36. What is a custom menu location?
  37. How do you schedule a post in WordPress?
  38. How do you change the site language?
  39. What is the difference between public and private posts?
  40. How do you reset your WordPress password?

WordPress – Intermediate (1–40)

  1. Explain the WordPress template hierarchy.
  2. What is wp-config.php used for?
  3. What is functions.php?
  4. How do you enqueue scripts and styles properly?
  5. What are custom post types (CPTs)?
  6. What are custom taxonomies?
  7. How do you create a custom menu using code?
  8. What is a WordPress hook?
  9. Explain the difference between actions and filters.
  10. What is the Loop in WordPress?
  11. What is WP_Query?
  12. How do you create a child theme manually?
  13. What is a page template?
  14. What are theme template tags?
  15. How do you override plugin functionality in a child theme?
  16. What is REST API in WordPress?
  17. What is nonce in WordPress security?
  18. How do you secure wp-config.php?
  19. What is database prefix and why is it important?
  20. What is the purpose of .htaccess in WordPress?
  21. How do you fix permalinks not working?
  22. What is multisite in WordPress?
  23. What are WordPress transients?
  24. What is the difference between get_option() and get_theme_mod()?
  25. How do you migrate a WordPress site manually?
  26. What is WP Cron?
  27. What is plugin conflict and how do you debug it?
  28. How do you improve WordPress performance?
  29. What is image optimization in WordPress?
  30. How do you handle WordPress backups?
  31. What is the difference between revision and autosave?
  32. How do you disable XML-RPC?
  33. What is the difference between WordPress roles and capabilities?
  34. What is a meta box?
  35. What are custom fields (post meta)?
  36. How do you change the login logo?
  37. Explain how WordPress handles user authentication.
  38. How do you register a widget area?
  39. What is the wp_head() function?
  40. What is the wp_footer() function?

WordPress – Experienced (1–40)

  1. Explain WordPress core architecture.
  2. How does WordPress load order work internally?
  3. Explain the full lifecycle of a WordPress request.
  4. How does the template hierarchy resolve templates?
  5. Explain advanced WP_Query optimization techniques.
  6. What is Object Cache in WordPress?
  7. How do you implement Redis/Memcached caching?
  8. Explain the internal working of WP Cron vs real cron.
  9. How does WordPress handle autoloaded options?
  10. What are performance bottlenecks in WordPress and how do you fix them?
  11. How do you optimize MySQL for high-traffic WordPress sites?
  12. Explain WordPress database schema in detail.
  13. How does WordPress handle multisite domain mapping?
  14. Explain the internal working of hooks system.
  15. How do you write a custom plugin from scratch?
  16. What is dependency injection in WordPress plugins?
  17. How do you use Composer with WordPress?
  18. What is the difference between MU-plugins and regular plugins?
  19. How do you build Gutenberg custom blocks?
  20. Explain how the block editor architecture works.
  21. What is wp_localize_script and when to use it?
  22. How do you implement custom REST API endpoints?
  23. How do you secure a high-traffic WordPress installation?
  24. Explain SQL injection risks in WordPress and prevention.
  25. How do you harden WordPress for enterprise use?
  26. What is the role of object caching layers (APCu, Redis)?
  27. How do you debug WordPress using Query Monitor?
  28. What is the role of WP_DEBUG and other debug constants?
  29. How do you use WP-CLI for site management?
  30. Explain the internal workings of plugin activation hooks.
  31. How does WordPress handle media uploads internally?
  32. Explain how rewrite rules work in WordPress.
  33. How do you customize the WordPress REST API authentication?
  34. What is the difference between authorization and authentication in WP?
  35. How do you create scalable WordPress architecture for millions of visitors?
  36. How do you handle WordPress session management?
  37. Explain how WordPress generates shortcodes internally.
  38. What is the role of the Heartbeat API and how to optimize it?
  39. How do you perform load testing for WordPress applications?
  40. Explain how to containerize WordPress using Docker.

WordPress Interview Questions and Answers

Beginner (Q&A)

1. What is WordPress and what are its main features?

WordPress is an open-source Content Management System (CMS) that allows individuals and businesses to create, manage, and publish websites without needing advanced programming skills. It is built using PHP and uses MySQL or MariaDB as its database. WordPress powers over 40% of all websites on the internet, making it the most popular CMS globally.

Main features of WordPress include:

  • User-Friendly Interface: Even non-technical users can manage content, install themes, and configure settings through a clean and intuitive admin dashboard.
  • Highly Customizable: You can extend and modify almost every part of a WordPress site using themes, plugins, and custom code.
  • Themes for Design: Thousands of free and premium themes provide ready-made designs that can be customized to fit any brand or purpose.
  • Plugins for Functionality: Over 60,000 plugins allow you to add everything from SEO tools to eCommerce features to complex data management.
  • SEO-Friendly Structure: Clean permalinks, easy metadata, and fast indexing make WordPress one of the most search-engine-friendly CMS platforms.
  • Large Community: A global ecosystem of developers, designers, and users contributes plugins, themes, documentation, and ongoing improvements.
  • Media Management: Easy upload and organization of media files such as images, videos, and audio.
  • Built-in Blogging Capabilities: WordPress was originally built for blogging and still offers robust post management, categories, tags, scheduling, and comments.
  • Open Source and Free: The core software is free to download, use, and modify.

In short, WordPress provides flexibility, scalability, and ease of use for beginners while remaining powerful enough for enterprise-level websites.

2. What is the difference between WordPress.com and WordPress.org?

Although both share the same core engine, WordPress.com and WordPress.org are two different platforms offering different levels of control, hosting, and customization.

WordPress.com

  • A hosted platform managed by Automattic.
  • No need to manage hosting, security, backups, or updates—they are handled automatically.
  • Limited freedom unless you pay for higher-tier plans.
  • Plugins installation is restricted to paid Business or higher plans.
  • Theme customization is limited compared to the self-hosted version.
  • Good for beginners, bloggers, and non-technical users.

WordPress.org

  • The self-hosted, free open-source version.
  • You download the software and install it on your own hosting server.
  • Full control over the website and server configuration.
  • No restrictions on installing themes or plugins.
  • You can modify the core code or build custom functionality.
  • Requires managing hosting, security, backups, and updates.

Key difference:
WordPress.com is like renting a fully managed house, while WordPress.org is like owning the home—you have full control but must maintain everything yourself.

3. What are themes in WordPress?

A WordPress theme is a collection of templates, style sheets, and layout files that define the visual appearance and design of a website. Themes control how your site looks—colors, typography, layouts, headers, footers, sidebars, and overall presentation.

Themes can be:

  • Free themes (from the WordPress theme directory)
  • Premium themes (from marketplaces like ThemeForest or StudioPress)
  • Custom themes (built from scratch or by developers)

Themes often include:

  • Responsive layouts for mobile, tablet, and desktop
  • Prebuilt page templates (blog, landing page, portfolio, contact)
  • Customization options in the WordPress Customizer
  • Built-in widgets, menus, and theme-specific settings

In essence, themes define the visual identity of a WordPress site without affecting the underlying functionality.

4. What are plugins in WordPress?

Plugins are add-on software modules that extend or enhance the functionality of a WordPress website. While themes handle appearance, plugins handle features and behavior.

Plugins can help you add:

  • Contact forms
  • SEO optimization
  • Caching and performance
  • Security and firewalls
  • E-commerce (like WooCommerce)
  • Social media integration
  • Membership systems
  • Custom post types
  • Learning management systems

There are 60,000+ free plugins in the WordPress Plugin Repository plus thousands of premium and custom plugins.

Plugins work by hooking into WordPress's core functionality, using the action and filter hook system to expand what the platform can do.

5. What is the WordPress Dashboard?

The WordPress Dashboard is the main administrative interface where site owners and editors manage everything related to the website. It appears after logging in via /wp-admin.

Key areas inside the dashboard:

  • Posts: Create and manage blog posts
  • Pages: Add and edit static pages
  • Appearance: Change themes, menus, widgets
  • Plugins: Install, activate, deactivate plugins
  • Users: Manage roles and permissions
  • Settings: Configure sitewide options
  • Media: Upload and manage images, audio, and video

The Dashboard provides quick access to updates, analytics (if enabled), recent activity, and shortcuts for managing content. It’s the control center for the entire website.

6. How do you install a theme in WordPress?

Theme installation can be done in three ways:

Method 1: Install from WordPress Directory

  1. Go to Appearance → Themes
  2. Click Add New
  3. Search for a theme
  4. Click Install
  5. Then click Activate

This is the easiest and most common method.

Method 2: Upload a Theme (Premium or Custom)

  1. Go to Appearance → Themes
  2. Click Add New
  3. Click Upload Theme
  4. Choose the .zip file of the theme
  5. Click Install Now
  6. Click Activate

Method 3: Install via FTP

Used rarely, for advanced users.

  1. Upload theme folder to /wp-content/themes/
  2. Go to Appearance → Themes
  3. Activate it

Once activated, you can customize it using Appearance → Customize.

7. How do you install a plugin in WordPress?

Plugin installation also has three main methods:

Method 1: Install from Plugin Directory

  1. Go to Plugins → Add New
  2. Search for the desired plugin
  3. Click Install Now
  4. Click Activate

Method 2: Upload a Plugin (.zip file)

  1. Go to Plugins → Add New
  2. Click Upload Plugin
  3. Choose the plugin .zip file
  4. Click Install Now
  5. Activate the plugin

Method 3: Install via FTP

  1. Upload plugin folder into /wp-content/plugins/
  2. Go to Plugins menu
  3. Activate the plugin

After activation, plugins may add new menu items, settings, or widgets.

8. What is the difference between posts and pages?

Posts and pages are the two primary content types in WordPress, but they serve different purposes.

Posts

  • Used for blog content or time-sensitive articles
  • Organized using categories and tags
  • Displayed in reverse chronological order
  • Have an RSS feed
  • Support comments (optional)
  • Good for news, articles, updates, announcements

Pages

  • Used for static content that does not change often
  • Do not use categories or tags
  • Not included in RSS feeds
  • Usually part of site structure (home, about, contact)
  • Can be hierarchical (parent → child pages)
  • Typically don’t show publication date

Conclusion:
Posts are dynamic and time-based; pages are static and evergreen.

9. What is a WordPress widget?

A widget is a small functional block designed to add content or features to widget-ready areas such as sidebars, footers, headers, or other theme-defined areas.

Examples of common widgets:

  • Search bar
  • Recent posts
  • Categories list
  • Featured images
  • Calendar
  • Social media icons
  • Custom HTML or text blocks

Widgets are managed via Appearance → Widgets, or in modern themes via Customizer or Block Editor widget areas.

Widgets enhance functionality without requiring coding.

10. What are categories in WordPress?

Categories are hierarchical taxonomies used to group related posts together. They help organize content and make navigation easier for users.

Key features of categories:

  • Allow parent-child hierarchy (nested structure)
  • Used mainly for blog posts
  • Improve SEO through keyword grouping
  • Help define content structure
  • Can be displayed in menus or widgets
  • Allow archives, e.g., yourwebsite.com/category/technology

Categories represent broad topics, while tags represent specific keywords.

11. What are tags in WordPress?

Tags in WordPress are non-hierarchical taxonomies used to help organize and describe the specific details of a post. While categories group broad topics, tags identify smaller, focused keywords related to the content.

Key characteristics of tags:

  • They are optional but recommended for better content organization.
  • They provide quick context about specific aspects of a post.
  • Unlike categories, they do not have parent-child relationships.
  • You can assign unlimited tags to a post.
  • Tags help users and search engines understand content topics.
  • They create their own archive pages, such as:
    site.com/tag/wordpress-tutorials/

Example:
A blog post titled “How to Install WordPress” might use tags like installation, setup, hosting, or WordPress basics.

In summary, tags act like keywords that help refine how content is grouped and discovered.

12. What is the Media Library in WordPress?

The WordPress Media Library is a built-in repository where all uploaded media files are stored and managed. This includes:

  • Images (JPEG, PNG, GIF, WebP)
  • Videos
  • Audio files
  • PDFs
  • Documents
  • ZIP files
  • Other supported formats

Main features of the Media Library:

  • Upload, edit, organize, and delete media files.
  • Edit image details such as title, alt text, caption, and description.
  • Basic image editing tools (crop, rotate, scale).
  • Search and filter media items by type or date.
  • Direct access from the editor when inserting media into posts/pages.

Media Library items are stored physically in the /wp-content/uploads/ folder, organized by year and month.

In short, the Media Library centralizes all media management tasks within WordPress.

13. What is a permalink?

A permalink (permanent link) is the full URL of a post, page, category, or tag archive. It is called “permanent” because it is intended to remain unchanged so users and search engines can reliably reference content.

Example of a good permalink:
https://example.com/how-to-start-a-blog/

Example of a poor permalink:
https://example.com/?p=187

Benefits of clean permalinks:

  • SEO-friendly
  • More readable and user-friendly
  • Easier to share
  • Helps search engines understand page content

WordPress allows you to configure permalink structure at:
Settings → Permalinks

Common formats include:

  • Post name
  • Month and name
  • Numeric
  • Custom structure (e.g., /blog/%postname%/)

Permalinks play a key role in website usability and search ranking.

14. How do you change the site title and tagline?

The site title and tagline define your website’s identity and appear in key places like browser tabs, search results, and site headers (depending on theme).

To change them:

Method 1: Using the Settings Panel

  1. Go to Settings → General
  2. Update the Site Title
  3. Update the Tagline
  4. Click Save Changes

Method 2: Using the Customizer

  1. Go to Appearance → Customize
  2. Click Site Identity
  3. Change the Site Title and Tagline
  4. Publish the changes

These settings help create a strong brand identity and improve site SEO.

15. How do you create a menu in WordPress?

To create a navigation menu:

  1. Go to Appearance → Menus
  2. Click Create a New Menu
  3. Give the menu a name (e.g., Main Menu)
  4. Add items from:
    • Pages
    • Posts
    • Custom links
    • Categories
  5. Arrange items using drag-and-drop
  6. Assign the menu to a theme location (e.g., header, footer, sidebar)
  7. Save the menu

You can also create dropdown menus by dragging items slightly to the right beneath parent items.

Menus help users navigate your site effectively and improve the overall user experience.

16. What is Gutenberg (Block Editor)?

Gutenberg, officially called the WordPress Block Editor, is the modern content editor introduced in WordPress 5.0. It replaces the Classic Editor with a block-based system, allowing you to build layouts visually.

Key features of Gutenberg:

  • Uses content “blocks” such as paragraphs, images, buttons, videos, quotes, galleries, tables, and more.
  • Allows drag-and-drop editing.
  • Supports reusable blocks for commonly used layouts.
  • Offers full-site editing in compatible themes.
  • Enables complex page designs without coding or page builders.

The block editor gives users greater control over layout, spacing, and multimedia content. It is more flexible, modern, and intuitive compared to the traditional editor.

17. What is the Classic Editor?

The Classic Editor is the older, traditional text-based editor used before WordPress 5.0. It resembles a simple word processor with a toolbar and a content box.

Characteristics of the Classic Editor:

  • Simple interface, similar to Microsoft Word.
  • Uses TinyMCE, a rich text editor.
  • Relies on shortcodes and HTML for advanced layouts.
  • No block-based design.
  • Popular among users who prefer a minimal editing experience.

While still available via the “Classic Editor Plugin,” it is considered outdated compared to Gutenberg. Many long-time WordPress users and theme developers, however, still prefer it for its simplicity and stability.

18. How do you create a new post in WordPress?

To create a new post:

Method 1: From the Dashboard

  1. Go to Posts → Add New
  2. Enter a title
  3. Add content using blocks (Gutenberg) or text editor
  4. Add categories and tags
  5. Set a featured image (optional)
  6. Choose post visibility (public, private, password-protected)
  7. Publish immediately or schedule it
  8. Click Publish

Method 2: Quick Draft

  1. On the Dashboard home screen
  2. Use Quick Draft to jot down ideas
  3. Save the draft
  4. Complete it later by editing

This makes posting content easy and flexible for bloggers and editors.

19. How do you enable or disable comments on a post?

There are three main ways to control comments:

Method 1: Per-Post Settings

  1. Edit a post
  2. Open Discussion panel (enable it from Screen Options if hidden)
  3. Check or uncheck Allow Comments
  4. Update the post

Method 2: Global Settings

  1. Go to Settings → Discussion
  2. Adjust default comment permissions
  3. Save changes

Method 3: Bulk Editing

  1. Go to Posts
  2. Select multiple posts
  3. Choose Bulk Actions → Edit
  4. Set comments to Allow or Do Not Allow

These settings give you full control over how users can interact with content.

20. What is the Reading Settings screen used for?

The Reading Settings screen controls how your website’s content is displayed to visitors. It is found at:

Settings → Reading

Key options include:

  • Homepage Display
    • Show latest posts (blog-style website)
    • Use a static page (homepage and blog page)
  • Blog pages show at most
    • Controls how many posts appear per page
  • Syndication feeds show the most recent
    • Sets the number of items in RSS feeds
  • For each article in a feed, show
    • Full text
    • Summary
  • Search Engine Visibility
    • Discourage search engines from indexing the site (useful for staging sites)

Overall, the Reading Settings screen determines how content is delivered to users and search engines.

21. What is the Discussion Settings screen used for?

The Discussion Settings screen controls how comments and interactions behave across your entire WordPress site. It defines the global rules for handling comments, notifications, and user communication.

Found at: Settings → Discussion

Main options include:

Default Article Settings

  • Allow people to post comments on new articles.
  • Attempt to notify other blogs when you link to them.
  • Allow link notifications (pingbacks/trackbacks).

Other Comment Settings

  • Require commenters to fill out name and email.
  • Restrict comments to registered/logged-in users.
  • Automatically close comments on posts after a defined number of days.
  • Enable threaded (nested) comments for better discussions.
  • Break comments into pages for long comment threads.

Email Notifications

  • Receive email alerts when a comment is posted or held for moderation.

Before a Comment Appears

  • Manual approval required.
  • Comment author must have a previously approved comment.

Comment Moderation and Blacklist

  • Automatically hold comments containing certain words, links, or emails.
  • Block spam through blacklisted keywords.

Avatar Settings

  • Show or hide avatars.
  • Choose avatar rating (G, PG, R, X).
  • Select default avatar for users without one.

Overall, this screen controls how users engage through comments, helping you manage discussion quality and reduce spam.

22. What is a featured image?

A featured image is the primary image representing a post or page. It acts as a visual thumbnail and is commonly used in:

  • Blog post lists
  • Social media shares
  • Homepage sections
  • Sliders and widgets
  • Related posts blocks

Featured images improve visual appeal, catch reader attention, and strengthen brand consistency.

Key points:

  • Set from the post editor using Featured Image panel.
  • Themes use them differently—some display them above the title, some in post cards, some in sliders.
  • Important for SEO and social sharing (Open Graph metadata).

In summary, featured images provide a visual identity for content and enhance user engagement.

23. How do you create a static homepage in WordPress?

WordPress can show either your latest posts or a static page as the homepage. To create a static homepage:

Step 1: Create Two Pages

  1. Create a page named Home
  2. Create a page named Blog (or any name for posts listing)

Step 2: Assign Using Reading Settings

  1. Go to Settings → Reading
  2. Under Your homepage displays:
    • Select A static page
    • For Homepage, choose your “Home” page
    • For Posts page, choose your “Blog” page
  3. Save changes

Step 3: Customize the Homepage

Use:

  • Gutenberg blocks
  • Page builder (Elementor, Divi)
  • Full Site Editing (FSE)
  • Theme customizer

Static homepages are ideal for business sites, portfolios, landing pages, or any non-blog layout.

24. What is a shortcode?

A shortcode is a small, bracketed code snippet that performs a dynamic function inside posts, pages, or widgets. It looks like this:

[shortcode]

Or with parameters:

[gallery ids="10,12,14"]

WordPress processes shortcodes to insert complex functionality without requiring coding.

Examples of common shortcodes:

  • [gallery] – Display image collections
  • [audio] – Embed audio
  • [video] – Show videos
  • [caption] – Add captions to images
  • [contact-form-7] – Insert forms (plugin-based)

Benefits:

  • Saves time
  • Adds features easily
  • Works across themes and plugins
  • User-friendly compared to writing HTML or PHP

Shortcodes are especially useful for embedding functionality inside content areas.

25. How do you change the admin password in WordPress?

There are several methods to change the admin password:

Method 1: Through WordPress Dashboard

  1. Go to Users → Profile (or Users → All Users → Edit)
  2. Scroll to Account Management
  3. Click Set New Password
  4. WordPress auto-generates a strong password
  5. Click Update Profile

Method 2: Using “Lost Your Password?”

  1. Go to the login page /wp-login.php
  2. Click Lost your password?
  3. Enter your username or email
  4. Check your email for a reset link
  5. Set a new password

Method 3: Change via cPanel or phpMyAdmin (Advanced)

  1. Open phpMyAdmin
  2. Select database → open wp_users table
  3. Find your admin row
  4. Edit the user_pass column using MD5() function
  5. Save changes

Choose this method if you’re locked out of the site.

26. What is a user role in WordPress?

A user role defines the permissions and capabilities assigned to each user. It determines what a user can and cannot do on a site.

Capabilities include:

  • Publishing posts
  • Editing posts
  • Managing plugins
  • Moderating comments
  • Managing themes
  • Managing users

WordPress has six default roles:

  1. Administrator – Full control over everything
  2. Editor – Can manage and publish all content
  3. Author – Can publish and edit their own posts
  4. Contributor – Can write but not publish posts
  5. Subscriber – Can manage their profile only
  6. Super Admin – For multisite networks (global control)

User roles help maintain a secure and organized workflow, especially in multi-author or team environments.

27. What is the difference between Administrator and Editor roles?

Administrator

  • Has full control over the site.
  • Can install/delete plugins and themes.
  • Can manage all users, including other admins.
  • Can modify site settings.
  • Can edit and publish all content.
  • Can customize the theme and core files.
  • Can access everything in the admin dashboard.

Intended for: site owners, technical managers, developers.

Editor

  • Can add, edit, publish, and delete any posts or pages.
  • Manages categories, tags, comments, and media.
  • Cannot manage themes, plugins, or site settings.
  • Cannot edit user roles.
  • Cannot access administrative settings.

Intended for: content managers, editorial staff, team leads.

Key difference:
The Editor handles content, while the Administrator handles both content and system-wide operations.

28. What is the Trash feature in WordPress?

The Trash feature acts as a safety net for deleted items. When you delete a post, page, comment, or media file, it is moved to Trash instead of being permanently deleted immediately.

Benefits:

  • Prevents accidental deletion.
  • Enables easy recovery.
  • Allows reviewing items before final deletion.

How it works:

  • Items stay in Trash for 30 days by default.
  • WordPress automatically empties Trash after the retention period.
  • You can manually restore or permanently delete items.

Trash is similar to the recycle bin on a computer and enhances data protection.

29. How do you update themes and plugins?

WordPress allows easy updates through the dashboard.

Method 1: One-Click Update

  1. Go to Dashboard → Updates
  2. Select themes/plugins
  3. Click Update

OR

Go to:

  • Plugins → Installed Plugins and click Update
  • Appearance → Themes and click Update

Method 2: Automatic Updates

WordPress allows enabling auto-updates:

  • From Plugins list → Enable auto-updates
  • From Themes → Enable auto-updates (in WordPress 5.6+)

Method 3: Manual Update via FTP

Used when updates fail:

  1. Download updated version
  2. Upload to /wp-content/plugins/ or /wp-content/themes/
  3. Overwrite existing files

Why updates matter:

  • Security patches
  • New features
  • Improved performance
  • Compatibility fixes
  • Bug fixes

Always back up your site before updates.

30. What is a child theme?

A child theme is a theme that inherits the functionality, design, and structure of a parent theme but allows you to safely customize it without modifying the parent theme’s files.

Benefits of using a child theme:

  • Safe updates: Parent theme updates do not affect your customizations.
  • Custom CSS and PHP changes: Add new features without touching core theme files.
  • Better maintainability: Clean separation of custom code.
  • Flexibility: You can override templates, functions, and styles.

A child theme typically contains:

  • style.css (with theme header information)
  • functions.php to enqueue parent/child styles
  • Any overridden template files

Child themes are essential for developers who want to customize themes professionally and safely.

31. What is the Appearance > Customize section used for?

The Appearance → Customize section, also known as the WordPress Customizer, is a live-preview customization tool that allows users to change how their site looks while seeing updates in real time before publishing.

Key features of the Customizer:

  • Site Identity: Change site title, tagline, logo, and favicon
  • Menus: Create and assign navigation menus
  • Widgets: Manage widget areas
  • Homepage Settings: Switch between blog and static homepage
  • Colors and Backgrounds: Adjust theme colors, background images
  • Typography: Change fonts (if supported by theme)
  • Header & Footer Options: Modify layout and design elements
  • Additional CSS: Add custom CSS without editing theme files
  • Theme-Specific Options: Many themes add extra sections (sliders, layout settings, etc.)

The Customizer gives users a safe and user-friendly place to personalize their site’s design before applying changes live.

32. What is a slug in WordPress?

A slug is the user-friendly, SEO-friendly portion of a URL that identifies a particular post, page, category, or tag.

Example URL:
https://example.com/best-wordpress-tips/

Here, best-wordpress-tips is the slug.

Characteristics of slugs:

  • Created automatically from the title but fully editable.
  • Should be short, descriptive, and use hyphens rather than spaces.
  • Only lowercase letters, numbers, and hyphens are recommended.
  • Helps search engines understand page content.
  • Can be edited in the permalink settings of each post or page.

Slugs improve readability, SEO, and the overall professionalism of your URLs.

33. How do you embed YouTube videos in WordPress?

WordPress makes YouTube embedding extremely simple through auto-embed features.

Method 1: Paste the YouTube URL

  1. Copy the YouTube video URL.
  2. Paste it directly into the Gutenberg editor.
  3. WordPress automatically converts it into an embedded player.

Method 2: Use the YouTube Block

  1. Click Add Block (+)
  2. Search for YouTube
  3. Paste the URL
  4. Click Embed

Method 3: Classic Editor

  • Paste the YouTube URL into the editor on its own line.

Method 4: Use YouTube Embed Code (Custom HTML Block)

  1. Click Share → Embed on YouTube
  2. Copy the <iframe> code
  3. Paste it using a Custom HTML block

WordPress’s oEmbed support makes embedding simple, responsive, and compatible with most themes.

34. What is the default content type in WordPress?

The default content type in WordPress is the Post.

WordPress has two primary built-in content types:

  1. Posts – dynamic, time-based content for blogs and feeds
  2. Pages – static, evergreen content like About or Contact pages

When you install WordPress, the system assumes you’ll be writing blog posts, so the post is the default type. Plugins can also introduce custom content types, such as:

  • Products (WooCommerce)
  • Events
  • Portfolios
  • Testimonials

But “Post” remains the core default type.

35. What is a favicon and how do you add it?

A favicon (short for “favorite icon”) is the small icon displayed in browser tabs, bookmarks, and mobile shortcuts. It helps users quickly identify your site and strengthens your brand identity.

How to add a favicon:

Method 1: Through Customizer

  1. Go to Appearance → Customize → Site Identity
  2. Look for Site Icon option
  3. Upload a square image (512×512 px recommended)
  4. Crop if necessary
  5. Publish

Method 2: Upload via Theme/Plugins

Some themes let you upload icons from their own settings panel.

Favicons are essential for branding and professionalism across browsers and devices.

36. What is a custom menu location?

A custom menu location is a specific area within a WordPress theme where a navigation menu can be assigned. Themes define these locations so users can decide where their menus appear.

Common menu locations include:

  • Header menu
  • Primary menu
  • Footer menu
  • Mobile menu
  • Sidebar menu
  • Social links menu

Themes may offer one or multiple menu locations.

You can assign menus to locations under:

Appearance → Menus → Manage Locations

Developers can also register new menu locations using the register_nav_menus() function. Custom menu locations make navigation flexible and customizable across various sections of your site.

37. How do you schedule a post in WordPress?

Scheduling allows you to publish content automatically at a future date and time.

Steps to schedule a post (Gutenberg Block Editor):

  1. Create your post
  2. In the right sidebar, find Publish section
  3. Click the date next to Immediately
  4. Choose a future date and time
  5. Click Schedule instead of Publish

Classic Editor:

  1. In publish panel, click Edit next to “Publish immediately”
  2. Choose future date/time
  3. Click OK
  4. Click Schedule

Scheduling is ideal for:

  • Editorial calendars
  • Global audiences
  • Time-based announcements
  • Consistent posting schedules

WordPress automatically publishes your post at the exact chosen time.

38. How do you change the site language?

WordPress supports over 100 languages. To change your site’s language:

Method 1: Change Global Site Language

  1. Go to Settings → General
  2. Scroll to Site Language
  3. Choose your preferred language
  4. Save changes

WordPress will download the language pack automatically.

Method 2: Change Language for a Specific User

  1. Go to Users → Profile
  2. Find Language option
  3. Choose preferred language
  4. Save

Useful for multilingual teams.

Some plugins (like WPML or Polylang) allow running the site in multiple languages simultaneously.

39. What is the difference between public and private posts?

Posts in WordPress can have different visibility settings:

Public Posts

  • Visible to everyone
  • Appear on homepage, archives, categories, RSS feeds
  • Indexable by search engines
  • Accessible to all visitors

Used for regular website content.

Private Posts

  • Only visible to logged-in users with Editor or Administrator roles
  • Hidden from homepage, archives, search results, RSS
  • Not indexed by search engines
  • Marked as private in the admin panel

Used for:

  • Internal content
  • Staff announcements
  • Confidential information

Visibility settings are found in the post editor under Document → Visibility.

40. How do you reset your WordPress password?

There are several ways to reset a WordPress password depending on access level.

Method 1: Reset from Login Page

  1. Go to /wp-login.php
  2. Click Lost your password?
  3. Enter username or email
  4. Click the link sent to your email
  5. Set a new password

This is the most common method.

Method 2: Reset from WordPress Dashboard

(If you are already logged in)

  1. Go to Users → Profile
  2. Scroll to Account Management
  3. Click Set New Password
  4. Save changes

Method 3: Reset via phpMyAdmin

Use this when locked out and email is not working.

  1. Open phpMyAdmin
  2. Open your database
  3. Go to wp_users table
  4. Edit your admin entry
  5. Change user_pass using MD5 encryption
  6. Save

Method 4: Using FTP

If code editing is possible:

  1. Temporarily add a password-reset script to functions.php
  2. Visit your site to trigger it
  3. Remove the code after resetting

These methods ensure you can always regain access to your WordPress admin account securely.

Intermediate (Q&A)

1. Explain the WordPress template hierarchy.

The WordPress template hierarchy is the structured system WordPress uses to determine which PHP template file should be used to display a specific type of page or content. It acts like a decision tree where WordPress searches for the most specific template file available and falls back to more general ones if necessary.

How the hierarchy works:

  1. WordPress determines the type of content being requested (e.g., a single post, category archive, search results).
  2. It searches for the most specific template file in the active theme.
  3. If that file is missing, it falls back to the next level in the hierarchy.
  4. Eventually, if no specific template is found, it uses index.php, the fallback template.

Examples:

Single Post:

Order of lookup:

  • single-{post_type}-{slug}.php
  • single-{post_type}.php
  • single.php
  • index.php

Page:

  • page-{slug}.php
  • page-{ID}.php
  • page.php
  • index.php

Category Archive:

  • category-{slug}.php
  • category-{ID}.php
  • category.php
  • archive.php
  • index.php

Homepage:

  • front-page.php
  • home.php
  • index.php

This hierarchy gives developers powerful control over customizing content layouts by creating specific templates without touching core files.

2. What is wp-config.php used for?

wp-config.php is one of the most important core configuration files in WordPress. It acts as the connection bridge between WordPress and the database, and it stores important site-level settings.

Key purposes of wp-config.php:

1. Database Configuration

It defines:

  • Database name
  • Username
  • Password
  • Host
  • Charset
  • Collation

Example:

define('DB_NAME', 'mydatabase');
define('DB_USER', 'myuser');
define('DB_PASSWORD', 'mypassword');
define('DB_HOST', 'localhost');

2. Authentication Keys & Salts

These enhance security by encrypting user cookies.

3. Table Prefix

$table_prefix = 'wp_';

4. Debugging Settings

define('WP_DEBUG', true);

5. Multisite Configuration

Enables WordPress Multisite if required.

6. Memory Limits and Performance

You can increase PHP memory, modify autosaves, or change cache settings.

7. Security Hardening

You can disable file editing:

define('DISALLOW_FILE_EDIT', true);

wp-config.php is never cached and is loaded early in the boot process, making it the central configuration point for your WordPress installation.

3. What is functions.php?

functions.php is a theme-specific file used to add or modify functionality. It works like a plugin and is loaded when the theme is activated.

Key purposes:

  • Enqueue scripts and styles
  • Register menus and widget areas
  • Add theme support (logos, post thumbnails, custom backgrounds, etc.)
  • Create shortcodes
  • Add custom functions
  • Modify default WordPress behavior
  • Register custom post types and taxonomies
  • Add filters and action hooks

Example:

add_theme_support('post-thumbnails');

Important notes:

  • It belongs to the theme, not WordPress core.
  • Switching themes disables its functionality.
  • For long-term functionality, use plugins instead of functions.php.

4. How do you enqueue scripts and styles properly?

Proper enqueuing ensures CSS and JS files are loaded safely without conflicts, duplicates, or breaking dependencies.

Use wp_enqueue_scripts action hook inside functions.php.

Example: Enqueue CSS

function my_theme_styles() {
    wp_enqueue_style('main-style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'my_theme_styles');

Example: Enqueue JS

function my_theme_scripts() {
    wp_enqueue_script('custom-js', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), '1.0', true);
}
add_action('wp_enqueue_scripts', 'my_theme_scripts');

Important parameters:

  • Handle: Unique name for the file
  • Source URL
  • Dependencies (array)
  • Version number
  • Load in footer (true/false)

Why proper enqueuing matters:

  • Prevents duplication
  • Supports dependency management
  • Maintains compatibility across themes and plugins
  • Works with caching/CDN systems

Never hardcode <script> or <link> tags directly in templates — always enqueue.

5. What are custom post types (CPTs)?

Custom Post Types (CPTs) allow you to add new content types beyond WordPress’s defaults (Posts and Pages). They help you structure content more effectively.

Examples of CPTs:

  • Products
  • Events
  • Portfolios
  • Testimonials
  • Courses
  • Real estate listings

Registering a CPT:

function create_movie_cpt() {
    register_post_type('movie', array(
        'label' => 'Movies',
        'public' => true,
        'supports' => array('title', 'editor', 'thumbnail'),
        'has_archive' => true,
    ));
}
add_action('init', 'create_movie_cpt');

Benefits:

  • Provides better data organization
  • Enhances CMS flexibility
  • Creates custom admin menus
  • Works with custom taxonomies
  • Allows custom templates in theme

CPTs turn WordPress into a full-featured CMS suitable for any type of structured content.

6. What are custom taxonomies?

Custom taxonomies are used to group and categorize custom post types (CPTs) or default posts in more specific ways.

WordPress has two built-in taxonomies:

  • Categories (hierarchical)
  • Tags (non-hierarchical)

Custom taxonomies allow you to create new grouping systems.

Examples:

  • Genre (for movies)
  • Skill level (for courses)
  • Location (for listings)
  • Department (for staff members)

Registering a custom taxonomy:

function create_movie_taxonomy() {
    register_taxonomy('genre', 'movie', array(
        'label' => 'Genres',
        'hierarchical' => true,
    ));
}
add_action('init', 'create_movie_taxonomy');

Advantages:

  • Better content classification
  • Improved filtering options
  • Easily implement advanced archives

Custom taxonomies allow developers to create complex content structures.

7. How do you create a custom menu using code?

WordPress allows you to register and display menus programmatically.

Step 1: Register Menu in functions.php

function my_custom_menus() {
    register_nav_menus(array(
        'header-menu' => __('Header Menu'),
    ));
}
add_action('init', 'my_custom_menus');

Step 2: Display Menu in Theme (header.php)

wp_nav_menu(array(
    'theme_location' => 'header-menu',
    'container' => 'nav',
    'menu_class' => 'main-menu',
));

This creates a fully dynamic menu that can be managed from the WordPress admin panel.

Why use code?

  • More control over placement
  • Multiple menu locations
  • Allows fallback functions
  • Useful for custom themes

8. What is a WordPress hook?

Hooks are powerful tools that allow developers to modify or extend WordPress functionality without editing core files.

There are two types of hooks:

  1. Actions – Execute custom code at specific points
  2. Filters – Modify or process data before output

Hooks make WordPress extremely customizable and flexible.

Example of adding an action:

add_action('wp_footer', 'my_custom_message');
function my_custom_message() {
    echo 'Thank you for visiting!';
}

Example of using a filter:

add_filter('the_title', 'modify_title');
function modify_title($title) {
    return '👉 ' . $title;
}

Hooks are the backbone of WordPress plugin and theme development.

9. Explain the difference between actions and filters.

FeatureActionsFiltersPurposeExecute custom codeModify existing dataReturn ValueDo not return anythingMust return dataUse CaseAdding functionalityChanging content/dataExampleAdding a footer messageEditing post titles

Actions

Triggered at a specific execution point.

Example:

add_action('init', 'register_custom_post_type');

Filters

Used to change or filter data.

Example:

add_filter('the_content', 'append_text');

In summary:
Actions do something, filters change something.

10. What is the Loop in WordPress?

The Loop is WordPress’s primary mechanism for outputting posts or pages. It retrieves content from the database and displays it according to the current query.

Example of a basic Loop:

if ( have_posts() ) :
    while ( have_posts() ) : the_post();
        the_title();
        the_content();
    endwhile;
else :
    echo "No posts found.";
endif;

What the Loop does:

  • Checks if posts exist
  • Iterates through each post
  • Sets up post data for template tags
  • Outputs titles, content, metadata, etc.

Why the Loop is important:

  • Essential for theme development
  • Controls how posts display in archives, homepages, and search results
  • Can be customized using WP_Query

The Loop is the heart of WordPress template rendering.

11. What is WP_Query?

WP_Query is a powerful WordPress class that allows developers to retrieve posts or custom content based on specific criteria. It is used to create custom queries rather than relying solely on the default WordPress Loop.

It enables querying posts by:

  • Post type (post, page, CPT)
  • Categories, tags, custom taxonomies
  • Meta fields (custom fields)
  • Keywords
  • Date ranges
  • Author
  • Order and sorting
  • Pagination

Example of a basic WP_Query:

$args = array(
    'post_type' => 'post',
    'posts_per_page' => 5
);

$query = new WP_Query($args);

if ($query->have_posts()) :
    while ($query->have_posts()) : $query->the_post();
        the_title();
        the_excerpt();
    endwhile;
    wp_reset_postdata();
endif;

Why WP_Query is important:

  • Allows creation of custom loops for archives, category-based sections, sliders, and widgets.
  • Works with all post types and taxonomies.
  • Helps developers build advanced querying logic.

It is the backbone of dynamic content retrieval in theme and plugin development.

12. How do you create a child theme manually?

Creating a child theme manually allows you to customize a theme safely without losing your changes during updates.

Step 1: Create a Child Theme Folder

In:
/wp-content/themes/
Create a folder named:
yourtheme-child

Step 2: Create style.css File

Add this header at the top:

/*
 Theme Name:   Your Theme Child
 Template:     yourtheme
*/

Template: must match the parent theme’s folder name.

Step 3: Create functions.php

Add:

<?php
function child_theme_styles() {
    wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
}
add_action('wp_enqueue_scripts', 'child_theme_styles');

(Modern themes use wp_enqueue_style for proper loading.)

Step 4: Activate the Child Theme

  1. Go to Appearance → Themes
  2. Activate the child theme

Step 5: Override Templates if Needed

Copy files from parent theme to child theme to override:
Example:

  • Copy header.php to child theme
  • Modify safely

Child themes allow customization without touching parent theme files.

13. What is a page template?

A page template is a specialized file in a theme that defines a custom layout or structure for individual pages. It lets developers create unique designs for special pages (contact page, landing page, gallery page, etc.).

How to create a page template:

  1. Create a file inside your theme, e.g.,
    page-custom.php
  2. Add this at the top:
<?php
/*
Template Name: Custom Layout Page
*/

How to use it:

  • In the WordPress editor, under Page Attributes → Template, select your custom template.

Use cases:

  • Custom landing pages
  • Full-width layouts
  • Page with no header/footer
  • Custom forms
  • Complex page structures

Page templates give developers full control over the design and layout.

14. What are theme template tags?

Template tags are built-in WordPress functions used inside theme files to retrieve and display dynamic content.

Examples include:

  • the_title() – Displays post title
  • the_content() – Displays post content
  • the_excerpt() – Displays summary
  • the_post_thumbnail() – Displays featured image
  • wp_head() – Loads scripts/styles in <head>
  • wp_footer() – Loads footer scripts
  • wp_nav_menu() – Displays navigation menus

Why they are important:

  • They abstract complex functionality into simple functions.
  • Make theme files cleaner and easier to maintain.
  • Allow themes to be flexible and extensible.

Template tags are essential tools for any WordPress theme developer.

15. How do you override plugin functionality in a child theme?

Overriding plugin functionality must be done carefully. There are a few safe methods:

Method 1: Template Overrides

Some plugins (WooCommerce, bbPress, EDD) allow overriding templates.

Steps:

  1. Search plugin’s template folder
    Example: /wp-content/plugins/woocommerce/templates/
  2. Copy the desired file into your child theme:
    yourtheme-child/woocommerce/...
  3. Modify the copied file
  4. Plugin will load your overridden version

Method 2: Using Hooks (Actions & Filters)

Most plugins offer hooks.

Example:

add_filter('plugin_output', 'my_custom_output');
function my_custom_output($content) {
    return 'Updated: ' . $content;
}

Method 3: Deregister and Replace Plugin Scripts

function replace_plugin_script() {
    wp_dequeue_script('plugin-script');
    wp_enqueue_script('custom-script', get_stylesheet_directory_uri() . '/custom.js');
}
add_action('wp_enqueue_scripts', 'replace_plugin_script', 20);

Method 4: Override Plugin Functions (If Pluggable)

Some functions are declared as:

if (!function_exists('plugin_function')) { }

You can redefine them in your child theme’s functions.php.

16. What is REST API in WordPress?

The WordPress REST API is a powerful interface that allows external applications and developers to interact with WordPress using HTTP requests, typically returning JSON data.

It provides endpoints like:

  • /wp-json/wp/v2/posts
  • /wp-json/wp/v2/pages
  • /wp-json/wp/v2/users

What it allows you to do:

  • Retrieve posts, pages, categories, menus
  • Create, update, delete content programmatically
  • Build headless WordPress websites
  • Integrate WordPress with mobile apps
  • Build React/Angular/Vue frontends
  • Create custom dashboards and applications

Example: Fetch posts with JavaScript

fetch('https://example.com/wp-json/wp/v2/posts')
  .then(res => res.json())
  .then(data => console.log(data));

The REST API makes WordPress a full content management backend for modern applications.

17. What is nonce in WordPress security?

A nonce (Number Used Once) is a security token used to protect WordPress URLs and forms from malicious attacks like:

  • CSRF (Cross-Site Request Forgery)
  • Unauthorized actions
  • Form tampering

Nonces validate that the request was made on purpose by an authenticated user.

Generate a nonce:

wp_nonce_field('save_data', 'custom_nonce');

Verify nonce:

if (!wp_verify_nonce($_POST['custom_nonce'], 'save_data')) {
    die('Security check failed');
}

WordPress nonces are temporary tokens (12–24 hours) and are not true cryptographic nonces, but extremely effective for security.

18. How do you secure wp-config.php?

Securing wp-config.php is critical because it contains:

  • Database credentials
  • Security keys
  • Salts
  • Configuration settings

Best methods to secure it:

1. Move wp-config.php Above Web Root

WordPress checks one level above root:

/public_html  
wp-config.php → move to /home/user/wp-config.php

2. Deny access via .htaccess

Add:

<files wp-config.php>
order allow,deny
deny from all
</files>

3. Set Correct File Permissions

On Linux:

chmod 400 wp-config.php

4. Disable File Editing

define('DISALLOW_FILE_EDIT', true);

5. Use Strong DB Credentials

Avoid default usernames like root.

6. Protect with Hosting-Level Firewall

Many hosting panels allow blocking direct access.

Properly securing wp-config.php drastically reduces hacking risks.

19. What is database prefix and why is it important?

The database prefix is added before every WordPress table name. Default prefix is:

wp_

Examples:

  • wp_posts
  • wp_users
  • wp_options

Why it’s important:

  1. Security Hardening
    Changing the prefix reduces risk of automated SQL injection attacks targeting default table names.
  2. Multisite or Multiple Installations
    Allows multiple WordPress installations to share one database:
    Example:
    • site1_posts
    • site2_posts
  3. Better Database Organization
    For developers managing complex structures.

Changing Prefix:

Requires updating:

  • wp-config.php
  • All table names
  • Any references in options and usermeta

The prefix is a small but important layer of database security.

20. What is the purpose of .htaccess in WordPress?

.htaccess is a server configuration file used primarily on Apache servers. In WordPress, it controls many features including:

1. Permalink Structure

WordPress automatically writes rewrite rules to .htaccess for clean URLs.

Example:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]

2. Security Rules

  • Blocking access to sensitive files
  • Disabling directory browsing
  • Denying XML-RPC
  • Protect wp-config.php

Example:

Options -Indexes

3. Redirects and URL Rewrites

  • 301 redirects
  • Force HTTPS
  • Redirect old pages to new ones

4. Enabling Browser Caching

<FilesMatch "\.(jpg|png|css|js)$">
Header set Cache-Control "max-age=31536000"
</FilesMatch>

5. Controlling File Upload Size

Some hosts allow edit via .htaccess.

.htaccess is a crucial file that optimizes URL structure, improves security, and enhances performance.

21. How do you fix permalinks not working?

Permalinks often break due to issues with .htaccess, server configuration, plugins, or incorrect rewrite rules. Common symptoms include 404 errors on posts/pages.

Step-by-step ways to fix permalinks:

1. Reset Permalink Structure

  1. Go to Settings → Permalinks
  2. Re-select your desired structure (e.g., Post name)
  3. Click Save Changes

This forces WordPress to regenerate rewrite rules.

2. Check .htaccess File (Apache Servers)

Ensure .htaccess exists in the root directory.

Default WordPress .htaccess:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

If missing:

  • Create .htaccess
  • Paste the above rules
  • Make it writable temporarily (chmod 644)

3. Enable Mod_Rewrite (Apache)

Ensure mod_rewrite is enabled:

sudo a2enmod rewrite
sudo service apache2 restart

4. For Nginx Servers

Add rewrite rules in site config:

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

5. Disable Plugins Causing Rewrite Conflicts

Some plugins alter permalinks.

  • Disable all plugins
  • Reactivate one by one
  • Identify the culprit

6. Check Custom Post Type Rewrite Rules

If CPT slugs return 404:

flush_rewrite_rules();

Place temporarily in functions.php.

7. Change File Permissions

Folder requires:

  • / root directory → 755
  • .htaccess → 644

Fixing permalinks often requires correcting rewrite rules, checking file permissions, and resolving plugin conflicts.

22. What is multisite in WordPress?

WordPress Multisite is a feature that allows you to run multiple WordPress sites from a single installation. It is ideal for organizations managing many websites under one system.

Key features of Multisite:

  • Single WordPress installation for all sites
  • Shared users, themes, and plugins
  • Centralized management through a Network Admin
  • Individual dashboards for each site
  • Super Admin role for managing the entire network
  • Ability to create sites as:
    • Subdomains (site1.example.com)
    • Subdirectories (example.com/site1/)
    • Custom domains (using domain mapping)

Use cases:

  • Universities (multiple department sites)
  • Government portals
  • Corporate intranets
  • Blogging networks
  • Agencies managing many clients

Enabling Multisite:

Add this to wp-config.php:

define('WP_ALLOW_MULTISITE', true);

The setup wizard guides you through necessary steps.

Multisite is powerful but requires strong hosting and maintenance practices.

23. What are WordPress transients?

Transients are temporary cached data stored in the database to improve performance. They allow you to store data with an expiration time.

They consist of:

  • Transient name
  • Data value
  • Expiration time

Example: Storing a transient

set_transient('weather_data', $data, 12 * HOUR_IN_SECONDS);

Fetching a transient

$data = get_transient('weather_data');

Deleting a transient

delete_transient('weather_data');

Use cases:

  • API responses (weather, stock data)
  • Query results
  • Cached HTML fragments
  • Expensive database operations

Why transients matter:

  • Reduce database load
  • Improve site speed
  • Enable smarter caching strategies

If object caching is enabled (Memcached/Redis), transients become even faster.

24. What is the difference between get_option() and get_theme_mod()?

Both functions retrieve stored settings, but they serve very different purposes.

get_option()

  • Retrieves global site-wide settings from the wp_options table.
  • Used by plugins and core WordPress.
  • Stores general configuration values.

Example:

$admin_email = get_option('admin_email');

get_theme_mod()

  • Retrieves theme-specific settings stored via the Customizer.
  • Values are theme-dependent.
  • Usually tied to the active theme.

Example:

$logo = get_theme_mod('custom_logo');

Key Differences

Featureget_option()get_theme_mod()ScopeSite-wideTheme-specificStorage Locationwp_options tabletheme_mods_optionUsed ByPlugins, WordPress coreTheme CustomizerPortabilityRemains after theme switchOften resets with theme

Summary:
Use get_option() for global settings.
Use get_theme_mod() for theme customization settings.

25. How do you migrate a WordPress site manually?

Manual migration involves moving both the files and the database.

Step 1: Download WordPress Files

Using FTP/cPanel:

  • Download entire /public_html/ or site folder
  • Includes:
    • Themes
    • Plugins
    • Uploads
    • Core files
    • wp-config.php

Step 2: Export Database

  1. Open phpMyAdmin
  2. Select database
  3. Click Export → Quick → SQL
  4. Save the database file

Step 3: Upload Files to New Server

Upload all downloaded files into the new root directory.

Step 4: Import Database

  1. Open new phpMyAdmin
  2. Create new empty database
  3. Import the SQL file

Step 5: Update wp-config.php

Update:

DB_NAME
DB_USER
DB_PASSWORD
DB_HOST

Step 6: Fix Domain in Database

If domain changes:

Update site URL:

UPDATE wp_options SET option_value='https://newsite.com' WHERE option_name='siteurl';
UPDATE wp_options SET option_value='https://newsite.com' WHERE option_name='home';

Step 7: Regenerate Permalinks

Go to Settings → Permalinks → Save Changes

Step 8: Fix Serialized Data (If Needed)

Use a search-replace tool for migrated domains.

Manual migration provides full control without relying on plugins.

26. What is WP Cron?

WP Cron is WordPress’s pseudo-cron system used to schedule automated tasks.

It is not a true server cron—it only runs when someone visits the site.

Tasks handled by WP Cron:

  • Publishing scheduled posts
  • Checking for updates
  • Sending email notifications
  • Running backups
  • Deleting transients
  • Plugin-defined tasks

Example of scheduling a cron event:

wp_schedule_event(time(), 'hourly', 'my_hourly_task');

Hook definition:

add_action('my_hourly_task', 'run_my_task');
function run_my_task() {
    // code here
}

Limitations:

  • No visitors = cron won’t run
  • Can be unreliable on low-traffic sites
  • Can be disabled using:
define('DISABLE_WP_CRON', true);

Then run real server cron for accuracy.

27. What is plugin conflict and how do you debug it?

A plugin conflict occurs when two or more plugins (or a theme + plugin) interfere with each other, causing:

  • Errors
  • Broken layouts
  • Missing features
  • White screen of death (WSOD)
  • Slow performance

How to debug plugin conflicts:

1. Disable All Plugins

If issue disappears → it's plugin-related.

2. Reactivate Plugins One by One

This identifies the conflicting plugin.

3. Switch to Default Theme

If issue persists → plugin conflict
If issue disappears → theme conflict

4. Check Browser Console

Look for JS errors caused by scripts.

5. Enable Debug Mode

In wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

Check /wp-content/debug.log.

6. Look for Duplicate Scripts/Styles

Sometimes two plugins load the same script in different versions.

7. Check PHP Version Compatibility

Plugins may not support your PHP version.

Debugging plugin conflicts ensures a stable and compatible WordPress environment.

28. How do you improve WordPress performance?

Improving WordPress speed involves optimizing hosting, caching, code, images, and database.

Key performance strategies:

1. Use Fast Hosting

Prefer:

  • VPS
  • Cloud hosting
  • Managed WordPress hosting

2. Enable Caching

Use:

  • Page caching
  • Browser caching
  • Object caching (Redis/Memcached)

Plugins:

  • WP Super Cache
  • W3 Total Cache
  • WP Rocket

3. Optimize Images

Compress using:

  • WebP format
  • Smush
  • ShortPixel
  • Imagify

4. Minify CSS/JS

Reduce file sizes and loads.

5. Use a CDN

Distribute content globally.

6. Reduce Plugin Load

Disable unnecessary plugins.

7. Optimize Database

Use plugins or SQL commands to remove:

  • Transients
  • Revisions
  • Spam comments

8. Lazy Load Media

Load images/videos when visible.

9. Use Lightweight Themes

Avoid heavy builders if possible.

10. Enable PHP OPcache

Boosts performance significantly.

A well-optimized WordPress site loads fast, ranks better, and improves user experience.

29. What is image optimization in WordPress?

Image optimization reduces file size without compromising visible quality. It improves:

  • Page load speed
  • SEO ranking
  • User experience
  • Server bandwidth usage

Image optimization techniques:

1. Compress Images

Tools:

  • ShortPixel
  • Smush
  • Imagify

2. Convert to Next-Gen Formats

Use:

  • WebP
  • AVIF (newer, more efficient)

3. Resize Images

Upload appropriate dimensions.

4. Enable Lazy Loading

WordPress has native lazy loading for images (loading="lazy").

5. Serve Images via CDN

Faster delivery worldwide.

6. Use Responsive Images

WordPress automatically adds:

srcset=""
sizes=""

Good image optimization dramatically reduces page size and improves performance.

30. How do you handle WordPress backups?

Backups protect your site from data loss due to hacking, corruption, or accidental changes.

A complete backup includes:

  • Files (wp-content, themes, plugins, uploads)
  • Database (posts, settings, users)

Backup Methods:

1. Backup Plugins (Most Popular)

Plugins like:

  • UpdraftPlus
  • All-in-One WP Migration
  • BackupBuddy
  • WPvivid

Features:

  • Scheduled backups
  • Cloud storage (Google Drive, Dropbox, Amazon S3)
  • One-click restore

2. Manual Backup

Using cPanel or FTP:

Files:

  • Download entire /public_html/ folder

Database:

  1. Open phpMyAdmin
  2. Export → SQL

3. Hosting Provider Backups

Managed hosting companies often offer:

  • Automatic daily backups
  • One-click restore
  • Snapshot backups before updates

4. Server-Level Backup Tools

Such as:

  • cPanel Full Backup
  • JetBackup

Best practices:

  • Keep multiple backup copies
  • Store backups offsite
  • Automate daily or weekly backups
  • Test restore process periodically

31. What is the difference between revision and autosave?

WordPress uses revisions and autosaves to help you recover content, but they serve different purposes.

Revisions

Revisions are permanent historical snapshots of your post or page content.

Key characteristics:

  • Saved each time you manually click Update/Publish.
  • Stored indefinitely (unless limited).
  • Allow you to compare versions using a visual diff tool.
  • You can revert to any previous revision anytime.
  • Stored in the database (wp_posts table with post_type = revision).

Use case:
Undoing mistakes, comparing old versions, restoring content deleted earlier.

Autosaves

Autosaves are automatically saved temporary drafts.

Key characteristics:

  • Saved every 60 seconds by default.
  • Only one autosave is kept per user.
  • Autosaves are not permanent revisions.
  • Used mainly for crash recovery (browser close, power failure, accidental navigation).

Use case:
Preventing content loss during writing.

Summary Difference:

FeatureRevisionsAutosaveTriggerManual save/updateAuto every 60 secondsQuantityUnlimited (unless limited)Only 1 per userPurposeVersion historyCrash protectionPermanent?YesNo

Both features improve content reliability but operate differently.

32. How do you disable XML-RPC?

XML-RPC allows remote publishing and app-based connections but is often disabled for security reasons because it has been targeted for DDoS and brute-force attacks.

Method 1: Disable via Code (Recommended)

Add this to functions.php:

add_filter('xmlrpc_enabled', '__return_false');

Method 2: Block via .htaccess (Apache Servers)

<Files xmlrpc.php>
Order Allow,Deny
Deny from all
</Files>

Method 3: Disable via Security Plugin

Plugins like:

  • Wordfence
  • Sucuri
  • iThemes Security
    Have simple toggle options to disable XML-RPC.

Method 4: Allow Partial XML-RPC

If you only want Jetpack or apps:

Use whitelist rules instead of full blocking.

Disabling XML-RPC enhances site security unless needed for specific integrations.

33. What is the difference between WordPress roles and capabilities?

WordPress uses a role-based access control system.

Roles

Roles are groups that define what a user can or cannot do.

Default roles:

  • Administrator
  • Editor
  • Author
  • Contributor
  • Subscriber

Each role is essentially a collection of capabilities.

Capabilities

Capabilities are individual permissions or actions a user can perform.

Examples:

  • edit_posts
  • publish_posts
  • manage_options
  • upload_files
  • delete_users
  • moderate_comments

Relationship:

  • A role is a bundle of capabilities.
  • Users are assigned roles, not capabilities directly.

Example:

Editor Role includes:

  • edit_others_posts
  • delete_posts
  • moderate_comments

Author Role includes:

  • publish_posts
  • edit_posts
    But not edit_others_posts.

Summary:

ConceptMeaningRolesCollections of capabilitiesCapabilitiesSpecific actions a user can perform

This system allows flexible and secure user management.

34. What is a meta box?

A meta box is a modular area in the WordPress editor screen that allows users to input additional information for a post, page, or custom post type.

You see meta boxes on the editing screen such as:

  • Featured Image
  • Categories
  • Tags
  • Custom fields
  • Excerpt
  • Slug
  • Page attributes

Developers create custom meta boxes to gather additional metadata, like:

  • Event dates
  • Product details
  • Author information
  • SEO fields

Example of adding a meta box:

add_action('add_meta_boxes', 'add_movie_info_box');
function add_movie_info_box() {
    add_meta_box('movie_info', 'Movie Info', 'movie_info_callback', 'movie');
}

Meta boxes allow enhanced content management and custom data entry.

35. What are custom fields (post meta)?

Custom fields (post meta) are key-value pairs attached to posts, pages, or custom post types. They store additional structured data that is not part of the main content.

Stored in:
wp_postmeta table

Examples of custom fields:

  • Price of a product
  • Event start date
  • Author biography
  • Rating
  • Custom URLs
  • Additional metadata for plugins

Adding custom fields:

Via WordPress editor:

  • Enable Custom Fields under screen options (Classic Editor)
  • Add key-value pairs

Or via code:


update_post_meta($post_id, 'price', '199');

Retrieve value:

get_post_meta($post_id, 'price', true);

Custom fields are essential for building dynamic, structured CMS functionality.

36. How do you change the login logo?

Changing the WordPress login logo helps with branding.

Method 1: Add code in functions.php

function custom_login_logo() {
    echo '
    <style type="text/css">
        #login h1 a {
            background-image: url(' . get_stylesheet_directory_uri() . '/images/logo.png);
            height: 80px;
            width: 200px;
            background-size: contain;
        }
    </style>';
}
add_action('login_head', 'custom_login_logo');

Method 2: Use a Plugin

Plugins like:

  • Custom Login Page Customizer
  • LoginPress
  • Theme My Login

Allow visual customization without coding.

Method 3: Custom Login Theme

Full customization for advanced users.

Branding the login screen creates a more professional client experience.

37. Explain how WordPress handles user authentication.

WordPress uses a combination of:

  • PHP sessions
  • Cookies
  • Hashed passwords
  • Nonces
  • Capability system

Authentication Workflow:

1. User Logs In

User submits username & password.

2. Password Verification

Password stored in DB as a hashed value using PHPass or modern hashing (wp_hash_password).

WordPress verifies using wp_check_password().

3. Cookies are Created

Two main cookies:

  • Authentication cookie: identifies the user
  • Login cookie: stores login session

These cookies store:

  • User ID
  • Expiration
  • HMAC key for validation

4. Capability Check

Before accessing admin or content, WordPress verifies:

current_user_can('capability_name');

5. Session Manager

WordPress maintains multiple sessions (per device login).

Users can be logged out remotely.

6. Nonces for Security

Protect actions like:

  • Post deletion
  • Form submission
  • AJAX calls

Authentication in WordPress is secure, token-based, and extensible through filters and hooks.

38. How do you register a widget area?

A widget area (sidebar) is a section where widgets can be added. To register one:

Step 1: Register Widget Area in functions.php

function my_widget_area() {
    register_sidebar(array(
        'name'          => 'Main Sidebar',
        'id'            => 'main_sidebar',
        'before_widget' => '<div class="widget">',
        'after_widget'  => '</div>',
        'before_title'  => '<h3>',
        'after_title'   => '</h3>',
    ));
}
add_action('widgets_init', 'my_widget_area');

Step 2: Display in Theme

Add in sidebar.php:

if (is_active_sidebar('main_sidebar')) {
    dynamic_sidebar('main_sidebar');
}

Widget areas allow theme developers to create flexible content blocks in sidebars, footers, headers, or custom template locations.

39. What is the wp_head() function?

wp_head() is a crucial template tag placed inside the <head> section of a theme, usually in header.php.

It allows WordPress, themes, and plugins to insert important elements into the document <head>.

What gets added by wp_head():

  • Stylesheets
  • Scripts
  • Meta tags
  • REST API links
  • JavaScript variables
  • Emoji scripts
  • Open Graph tags
  • RSS and oEmbed links

Example placement:

<head>
    <?php wp_head(); ?>
</head>

If wp_head() is missing:

  • Plugins may break
  • Styles may not load
  • Customizer won’t work properly
  • Admin bar may break

It is essential for proper WordPress theme operation.

40. What is the wp_footer() function?

wp_footer() is another essential template tag placed inside the theme’s footer, right before the </body> tag.

It allows WordPress, themes, and plugins to load important scripts and code at the end of the page.

What it typically loads:

  • JavaScript files (jQuery, plugin scripts)
  • Analytics scripts
  • Footer widgets
  • AJAX handlers
  • Admin bar scripts

Example placement:

<?php wp_footer(); ?>
</body>
</html>

Why wp_footer() is important:

  • Ensures JavaScript is loaded properly
  • Improves performance by loading JS at bottom
  • Allows plugin functionality (tracking, popups, etc.)
  • Required for many front-end features

Without it, many plugins and features will not function as expected.

Experienced (Q&A)

1. Explain WordPress core architecture.

WordPress core architecture is designed on a modular, extensible, hook-driven system that separates responsibilities cleanly and allows full customization without modifying core files.

Key Components of WordPress Architecture:

1. Core Files

Located mostly in /wp-includes/ and /wp-admin/.

Major components:

  • Query system (WP_Query)
  • User/authentication system
  • Rewrite and routing
  • Taxonomy and metadata APIs
  • REST API
  • Cron system
  • Plugin and theme API
  • Database access layer (wpdb)

2. Themes

Themes control presentation, not logic. They are responsible for:

  • Templates
  • Styling
  • Layout
  • Template hierarchy

Themes interact with core using template tags and hooks.

3. Plugins

Plugins extend functionality using:

  • Actions
  • Filters
  • Custom post types
  • Custom taxonomies
  • Custom tables
  • REST API endpoints

Plugins integrate cleanly without altering core.

4. Database (MySQL/MariaDB)

WordPress stores data in standard tables:

  • wp_posts, wp_users, wp_options
  • wp_postmeta, wp_terms, wp_term_taxonomy

Uses a clean CRUD approach via the $wpdb class.

5. Hook System

At the heart of customization:

  • Actions = add new functionality
  • Filters = modify output

This system allows developers to attach or override logic anywhere.

6. Request Routing

Uses Rewrite API and WP_Query to route URLs to the proper content.

7. REST API

Provides a modern interface for external applications to interact with WordPress programmatically.

Architecture Philosophy:

  • Loose coupling
  • Backward compatibility
  • Plugin-first extensibility
  • Security through sanitized APIs

WordPress is built to be flexible while maintaining strong backward compatibility and extensibility.

WeCP Team
Team @WeCP
WeCP is a leading talent assessment platform that helps companies streamline their recruitment and L&D process by evaluating candidates' skills through tailored assessments