WordPress - Interview Questions and Answers

Word press is the best Open Source CMS which allows it to be used free of cost.  You can use it on any personal or commercial website without having to pay a single penny for it. It is built on PHP/MySQL (which is again Open Source) and licensed under GPL.

First version of wordress is released in Year 2003

WordPress is safe and secure to operate. You need not worry about anything but, still, it is suggested to update your site with latest WordPress version to avoid hacking.

When talking about WordPress interview questions and answers for experienced, as well as WordPress interviews questions and answers for freshers, one that often comes up is what the requirements to run WordPress are.

Here is what is recommended:

  • PHP version 7.2 or greater
  • MySQL version 5.6 or greater OR MariaDB version 10.0 or greater
  • HTTPS support
  • Apache or Nginx are recommended for running WordPress, but any server that supports PHP and MySQL will do

WordPress is so popular because of its features. It is the most popular content management system (CMS) in the world. It is the first choice of everyone who want to create a website because of its popularity. WordPress features include a plug-in architecture and template system. Nowadays, WordPress is used by more than 19% of the top million websites. It is of many PHP/MySQL content management systems that allow content editors to use a web interface to maintain their websites instead of editing and uploading HTML files to a server.

  • Simplicity and Flexibility
  • In-corporate with publishing tools
  • User Management
  • Media Management
  • Full Standards Compliance
  • Ease Theme System
  • Extend with Plugins
  • Built-in Comments
  • Search Engine Optimized & Multilingual
  • Open Source

 It is one of the benefits of using WordPress; it has inbuilt SEO search engine. Also, you can have an additional plug-in in WordPress to help with SEO and rank on a popular search engine like Google.

  • PHP 7 or greater
  • MySQL 5.6 or greater OR MariaDB 10.0 or greater
  • The mod_rewrite Apache module
  • HTTPS support(Recommended)

WordPress can be used for e-commerce sites, membership sites, photo galleries, and any other type of site you can think of. Following are some disadvantages of WordPress:

  • Using several plugins can make the website heavy to load and run.
  • PHP knowledge is required to make modifications or changes to the WordPress website.
  • Sometimes software needs to be updated to keep WordPress up-to-date with the current browsers and mobile devices. Updating the WordPress version leads to loss of data, so a backup copy of the website is required.
  • Modifying and formatting the graphic images and tables is difficult.

Another one of the most popular WordPress questions is about the features WordPress offers. Here are some of the most important ones:

  • Simplicity – it’s quick and easy to use
  • Flexibility – you can create everything from blogs to business websites
  • Publishing Tools – you can easily manage your content
  • Media Management – quick and easy image upload
  • Numerous Plugins
  • SEO
  • Multilingual

It is provided by WordPress to allow your plugin to ' hook into' the whole WordPress; that is, to call functions in the plugin at particular times according to your need and thereby set your plugin in motion.

There are two kinds of hooks:

  • Actions hook
  • Filters hook

WordPress Plugins are a piece of code that contains one or more functions written to extend and add to the functionality of an existing WordPress website.
The core of WordPress is designed to be lean and lightweight, to maximize flexibility and minimize code bloat. Plugins then offer custom functions and features so that each user can tailor their site to their specific needs.

  • Below is the list of plugins that comes with WordPress installation.
  • Akismet
  • Hello Dolly

The difference is the host. With WordPress.org – you host your own website; with WordPress.com – they host it for you.

1. Actions Hook

Actions Hook are triggered by particular events that take place in WordPress such as changing themes, publishing a post, or displaying an administration screen. It is a custom PHP function defined in your plugin and hooked, i.e., set to respond, to some of these events.

Actions offently do one or more of the following things

  • Modify database data
  • Send an email message
  • Modify the generated administration screen or front end page sent to a user web browser.

Here are some Actions Functions listed

  • has_action()
  • do_action()
  • add_action()
  • remove_action() etc

2. Filters Hook

Filters Hook are functions that WordPress passes data through, at certain points in execution, just before taking some action with the data. It sits between the database and the browser and between the browser and the database; all most all input and output in WordPress pass through at least one filter hook.

The necessary steps to add your filters to WordPress are listed:

  • Create the PHP function that filters the data
  • Hook to the screen in WordPress, by calling add_filter()
  • Put your PHP function in a plugin file and activate it.

Here are some Filters Functions listed

  • has_filter()
  • doing_filter()
  • add_filter()
  • remove_filter() etc

WordPress contents are stored in MySQL database on Server.

Posts and Pages are the two content types in WP.

Posts are timed and listed in chronological order with the latest posts at the top. Posts are meant to be shared and commented on.

Pages are static content, so an about us, contact us page, etc. They are permanent and timeless entries.

  • Download Wordpress from www.wordpress.org
  • Extract the downloaded files and upload it on your web server or localhost.
  • Open your web browser and navigate to the WordPress file path. Then you see the first screen of the WordPress installer.
  • In the next step, please select your preferred language.
  • In the next step, you see the information needed for the database before proceeding the WordPress installation.
  • enter the details of your Mysql database.
  • Wordpress checks the details provided by you and gives you a confirmation screen.
  • In the next step, you have to enter the administration details.
  • After entering the administration details, click on "Install WordPress" button.
  • After successful installation, you get a screen stating "success." You can see the username and the password on this screen.
  • Enter your username and password on the next screen and click 'login.'

Let’s take a look at WordPress question and answer about debugging. First of all, we need to know that Debugging PHP code is part of any project and the debug system in WordPress is quite simple.

WP_DEBUG is a PHP constant that can be used to enable the debug mode throughout WordPress at any time. By default, it is assumed to be false so you need to set it to true in the wp-config.php file.

There are altogether 12 tables by default in WordPress.

  • wp_options
  • wp_users
  • wp_links
  • wp_commentmeta
  • wp_term_relationships
  • wp_postmeta
  • wp_posts
  • wp_termmeta
  • wp_term_taxonomy
  • wp_usermeta
  • wp_terms
  • wp_comments

We can make many types of user types of roles.

  • Administrator Role
  • Author Role
  • Editor Role
  • Subscriber Role
  • Contributor Role

Template tags are used within the Templates to customize your blog. The common types of tags are:

  • General Tags
  • Author Tags
  • Bookmark Tags
  • Category Tags
  • Comment Tags
  • Link Tags
  • Post Tags
  • Post-Thumbnail Tags
  • Navigation Menu Tags
Share   Share