Online interview questions

Prepare interviews on Anything, AnyWhere

PHPSCOTS
PHPSCOTS
Blogger, Developer Views: 1090

WordPress interview questions

WordPress interview questions and answers

1. What is wordpress.

WordPress is free open source content management system (CMS) written PHP language and and licensed under GPL.
It allows users to create dynamic websites from personel blogs to e-commerce.Wordpress current stable version as on 13 ,July 2017 of wordpress is 4.8. You can download it free without any cost from https://wordpress.org/latest.zip.

2. What year was WordPress released?

2003

3. What are minimum requirements to run WordPress?

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

4. List some features of WordPress.

WordPress powers more than 28% of the web and this figure is not limited it rises every day.Everything from simple websites, to blogs, to complex portals and enterprise websites, and even applications, are built with WordPress.

Here are some of the features of wordpress.

  • It’s Simplicity
  • Easier publishing tools
  • Search Engine Optimized
  • User Management
  • Media Management
  • Easy Theme System
  • Easy Extendability with Plugins
  • Multilingual Support
  • Easy Installation and Upgrades
  • Multilingual Support
  • Built-in Comments System
  • Custom Content Types

5. What is plugin in WordPress? List plugin that comes with WordPress.

WordPress Plugins are piece of code that contains one or more functions written to extend and add to the functionality to 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 are the list of plugins that comes with WordPress installation.

  • Akismet
  • Hello Dolly

6. What is the difference between wordpress.com and wordpress.org

The difference is in who’s hosting your site. With org, YOU host your website or blog. This is where you find the open source software to download.
-com, THEY host for you.

7. Where is WordPress content stored?

WordPress contents are stored in MySQL database on Server.

8. What are the differences between Posts and Pages?

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 are static content, so an about us, contact us page etc. They are permanent and timeless entries.

9. What are the types of hooks in WP and what are their functions?

There are two types hooks are available in wordpress, action hooks and filter hooks
They allow user to, with short snippets of code, modify areas in a theme or plugin without modifying the original file.

10. What is an action hook?

An Action hook in WordPress is a hook that is triggered at specific time when WordPress is running and lets you take an action. This can include things like creating a widget when WordPress is initializing or sending a Tweet when someone publishes a post.

11. What is a filter hook?

A Filter hook in WordPress allows you get and modify WordPress data before it is sent to the database or the browser. Some examples of filters would include customizing how excerpts are displayed or adding some custom code to the end of a blog post or headings.

12. How do you enable debug mode in WP?

You can enable debug mode in WP by editing wp-cofig.php file and changing WP_DEBUG constant value to true

13. What is a WordPress taxonomy?

In WordPress, a “taxonomy” is a grouping mechanism for some posts (or links or custom post types).There are four default taxonomies in WordPress they are

  • Category
  • Tag
  • Link Category
  • Post Formats

You are also free to create you custom taxonomies too.

14. Is WordPress secure?

Yes. A WP website is completely secure. The error can come from downloading plugins and tools from an unauthorized source.

15. How many default tables are the Worpress,Can you list them?

There are 11 table in wordpress, they are

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

16. What is default table prefix for wordpress?

wp_ is default prefix for WordPress.

17. What are disadvantages of WordPress?

  • Use of multiple plugins can make website heavy to load and slow
  • Only utilizes PHP
  • Sometimes updates can lead to loss of data, so you always need a backup copy
  • Modifying images and tables are difficult.

18. What is the difference between installing and activating a theme?

When a theme is activated it’s what’s controlling your site, while an installed theme is simply part of your theme library and available to activate.

19. Which ‘meta box’ is not hidden by default on Post and Page screens?

Featured Image is the meta box that is not hidden by default on Post and Page screens.

20. What is the difference between the two URLs in General Settings? (Hint: WordPress Address AND Site Address).

The WordPress Address is where to look for WordPress files, while the Site Address is what will be used as the base for creating URLs for web pages.

21. What are Importers in wordpress?

In WordPress Importers are plugins that provides functionality to import a bulk XML file with any number of records. It enables to import Posts, Page, Custom Posts and Users data in a XML file.

22. What do you mean by custom field in WordPress?

Custom fields is also known as post meta. Post meta is a feature in WordPress which allows post authors to add additional information at time writing a post. WordPress stores this information as meta data in key value pairs. Users can later display this meta data by using template tags in their WordPress themes if required.

23. In WordPress objects are passed by value or by reference.

In WordPress, all objects are passed by value.

24. What is loop in WordPress?

The Loop is PHP code used by WordPress to display posts.

25. How can you disable comments in WordPress?

To disable comments in WordPress, Please follow below steps

  • Step 1: Login to your wordpress admin panel.
  • Step 2: Go to Settings menu.
  • Step 3: Under Settings menu click on Discussion.
  • Step 4: Uncheck Allow people to post comments on new articles . check box
  • Step 5: Click on save changes button, you done

26. How to run database Query in WordPress?

WordPress’s query function allows you to execute any SQL query on the WordPress database. It is best used when there is a need for specific, custom, or otherwise complex SQL queries. For more basic queries, such as selecting information from a table, see the other wpdb functions above such as get_results, get_var, get_row or get_col.

Syntax

<?php $wpdb->query('query'); ?> 

Read more from https://codex.wordpress.org/Class_Reference/wpdb#Running_General_Queries

27. List some action and filter hooks functions in WordPress?

Below are list of some Filter hooks functions

  • has_filter()
  • add_filter()
  • apply_filters()
  • apply_filters_ref_array()
  • current_filter()
  • remove_filter()
  • remove_all_filters()
  • doing_filter()

Below are list of some Action hooks functions

  • has_action()
  • add_action()
  • do_action()
  • do_action_ref_array()
  • did_action()
  • remove_action()
  • remove_all_actions()
  • doing_action()

28. What are the template tags in WordPress? List some of them.

In WordPress template tags are PHP functions that are used to display information dynamically or customize blog template.Below are the list of some generally used template tags in WordPress

  • get_header()
  • wp_register()
  • get_sidebar()
  • wp_title()
  • wp_enqueue_script()
  • get_the_author()
  • wp_list_authors()
  • category_description()
  • get_bookmarks()

Read More about WordPress template tags from https://codex.wordpress.org/Template_Tags

29. Function to get website url in wordpress?

get_site_url(); function is used to get website url in wordpress.

30. How will you display error messages during development in WordPress?

To display error messages in WordPress. Open WordPress wp-cofig.php file and change WP_DEBUG constant value to true

In WordPress WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the “debug” mode throughout the website.