17th
Apr
Wordpress Interview Questions

Wordpress Interview Questions for experienced

  • Sharad Jaiswal
  • 17th Apr, 2021
  • 463 Followers

About Wordpress

Wordpress is an online content management system written in PHP scripting language. It free to use and download. WordPress is released under GPLv2+ license and can be used with MySQL or MariaDB databases. If you are WordPress Developers and looking for resources to crack an interview on Wordpress then please prepare the following questions.

Wordpress Interview Questions

1) What is WordPress?

WordPress is an online, open-source website creation tool written in PHP. It is the easiest and most powerful blogging and website content management system (CMS) existing today.

2) What are basic requirements to install Wordpress?

Basic requirements to install Wordpress are:-

  • PHP (Version 7 or higher version).
  • MySQL (5.6 or greater).
  • URL Rewrite Capability; It is not required, but strongly recommended for a better URL friendly site.
  • HTTPS; It is not mandatory but strongly recommended for secure communication between the server and your browser.

3) Enlist few advantages of using WordPress?

Few advantages of using WordPress:-

  • Wordpress designing and development is Cost-effective.
  • We can update the site from anywhere as long as we can access the internet.
  • WordPress is SEO friendly.
  • Every time you post a new blog entry, it can automatically go to an RSS feed, making it easier for others to syndicate your content across directories and other websites. It means it has a Convenient Syndication.
  • Responsive Web Design.

4) What is difference between wordpress.com and wordpress.org?

With WordPress.org, you host your own blog or website. WordPress.org is where you'll find the free WordPress software that you can download and install on your own web server.

  • Plugins can upload
  • Can access and customize all backend code, database, files
  • Can upload your free, premium or custom themes to customize your website.

WordPress.com, on the other hand, takes care of all of the hostings for you. You don’t have to download software, pay for hosting, or manage a web server.

  • Plugin upload is not allowed,
  • Backend code, database, file access is not allowed
  • Theme upload is not allowed

5) In which year WordPress was released?

WordPress was released on May 27, 2003, by its founders, Matt Mullenweg and Mike Little, as a fork of b2/cafelog. The software is released under the GPLv2 (or later) license.

6) Enlist different types of user roles available in WordPress?

Wordpress user different roles are enlisted as follows

Subscriber

A subscriber is just like a regular user of the website. If you provide a subscriber role to your user, they can log in to your WordPress website, update their profiles and change their passwords. They cannot write posts, view comments, modify the WordPress theme or anything else inside your WordPress admin area. This type of role suits when you want your users to log in to your website to view posts or leave a comment. Being a subscriber, they may also enroll for Email subscriptions like newsletters and promotions if you provide one on your website.

Contributor

Contributors are the users who prominently aim for getting recognition by contributing their work on your website. A contributor can add a new post, edit their post but they cannot publish any post, not even their personal ones. Apart from that, they have no access to the admin functionalities like altering the website design, uploading the plugins or creating new categories.

Contributors can, however, choose from the existing categories and add the relevant tags to their posts. They can also view all the comments, even which are in moderation but, they cannot alter, approve or delete them. They are even restricted to upload any external files on the website, not even the images for their posts.

Author

As the name states, users who have been assigned the role of an author can write, edit and publish their posts. They have full freedom to upload media files to use within their posts.

Coming to the things which are restricted for a user assigned an author role, they cannot create any new categories. They can only choose an existing category and create new tags for their posts. They can view all the comments including the ones which are awaiting moderation from the admin but, they cannot alter, moderate, approve or delete any comments.

The author does not have the freedom to change the theme, plugin and other settings of the website.

The biggest disadvantage or fear of assigning an author role is, even after publishing the posts, they can delete any of their posts. While it is not a major issue for many but, it can create a problem in some instances. Like, an author can delete the posts after publishing them, even if they are paid for this task or, may delete their posts after resigning from your company. The consequences of such situations cannot be imagined and can be dangerous for your website.

Thus, it is always better to keep a WordPress backup for your website.

In this post, we would also see how to resolve this issue by restricting an author from deleting a post.

Editor

As the name suggests, an editor sits at the top position of handling the content of your website. Thus, a user with an editor role can do anything with the content of your website. They have access to add, edit, publish and delete any posts on your WordPress website. This includes all the posts, even the ones written by others (Author, Contributor, Admin). An editor can view all the comments and also moderate, alter, and delete them as well.

Having access to all the content aspects of the website, the editor cannot change the site’s settings, remove or change plugins or add any new users.

Administrator

An administrator role is the most dominant role and is mainly reserved for the site owners only.

As an administrator, the user can add, edit and delete any post on the website. This includes posts by editors, authors, and contributors as well.

A user with an administrator (abbreviated as admin) role can change the structure of the website including its theme, plugins, and other user settings. An administrator is the only user which can create new users and modify and delete any existing ones including other administrators also.

An administrator’s role provides the user with a full hold over the website and thus regarded as the most powerful role of a WordPress website.

The biggest concern while assigning the admin role is when you are working in a multi-partner WordPress website. In such a case, you should always have the proper legal documents to prevent any future dispute.

7) Why is MySQL used mostly with WordPress?

WordPress uses MySQL as its main DBMS. It stores and fetches almost all of its information including user-profiles and credentials and post contents etc., in MySQL databases. MySQL being open-sourced and a part of LAMP development stacks turns out to be the default database choice for WordPress.

8) What is the use of general setting in Wordpress?

WordPress's general setting is used to set the basic configuration settings for your site. In the setting administration screen, it is a default setting screen.

Following are the steps to access the general settings −

  1. Step − Click on SettingsGeneral option in WordPress.
  2. Step − The General Setting page is displayed. The following are the details of the fields on the general settings page.
    • Site Title − It displays the name of the site in the template header.
    • Tagline − Displays a short sentence about your site.
    • WordPress Address (URL) − It is the URL of WordPress directory where your all core application files are present.
    • Site Address(URL) − Enter the site URL which you want your site to display on the browser.
    • E-mail Address − Enter your e-mail address which helps to recover your password or any update.
    • Membership − Anyone can register an account on your site after you check this checkbox.
    • New User Default Role − The default role is set for the newly registered user or members.
    • Timezone − Sets the time zone based on a particular city.
    • Date Format − Sets the date format as you need to display on the site.
    • Time Format − Sets the time format as you need to display on the site.
    • Week Starts On − Select the weekday which you prefer to start for WordPress calendar. By default, it is set as Monday. Site
    • Language − Sets the language for the WordPress dashboard.
  3. Step − After filling all the information about general settings, click on the Save Changes button. It saves all your general setting information.

9) What are plugins in Wordpress?

A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites.

WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. In the WordPress community, there is a saying that goes around: “there’s a plugin for that”. They make it easier for users to add features to their website without knowing a single line of code.

As a site administrator, you can install/uninstall plugins from the admin area. You can also download and manually install them using an FTP client.

10) What is Permalink in WordPress?

Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent and never change — hence the name permalink.

11) What is a custom field in WordPress?

Custom fields also referred to as post meta, are a feature in WordPress which allows users to add additional information when writing a post. WordPress stores this information as metadata. Users can display this metadata by using template tags in their WordPress themes.

Examples of custom fields can be:

  • The music you are listening to while writing the post
  • The rating that you might want to add for a product that you were reviewing
  • Or anything else that you can think of

12) Which SEO plugin you use for Wordpress SEO?

Yoast SEO is the best WordPress SEO plugin on the market. It offers a complete website optimization tool that helps you improve your website.

It lets you easily add SEO titles and descriptions to all posts and pages on your website. You can also use it to add Open Graph metadata and social media images to your articles.

Yoast SEO automatically generates an XML sitemap for all your website content which makes it easier for search engines to crawl your website. It also helps you easily import your SEO data if you have been using another other SEO plugins

13) How can you disable comments in WordPress?

To do that, go to Settings » Discussion from the left sidebar of your WordPress admin panel. On this page, you need to uncheck the option that says “Allow people to post comments on new articles” and then click on the Save Changes button to store your settings. This will disable comments on all your future posts.

14) What are importers in WordPress?

The WordPress Importer will import the following content from a WordPress export file:

  • Posts, pages, and other custom post types
  • Comment
  • Custom fields and post meta
  • Categories, tags, and terms from custom taxonomies
  • Authors

15) What is a WordPress taxonomy?

A taxonomy within WordPress is a way of grouping posts together based on a select number of relationships. By default, a standard post will have two taxonomy types called Categories and Tags which are a handy way of ensuring related content on your website is easy for visitors to find. These two types of taxonomies are included in WordPress by default, but just like any other taxonomy, can be removed or changed and you can even add more if you like. you can create your own taxonomies for use on your website or blog with a small amount of code.

16) How to run database Query on WordPress?

WordPress has a built-in object class for dealing with database queries. It’s called wpdb and it’s found in the includes/wp-db.php file. When you’re running queries you should always use this class to execute them. To use this class you first need to define $wpdb as a global variable before you can use it. Just place this line of code before every $wpdb function:

Global $wpdb

Within your wpdb functions, you should use the prepare() function. This secures your query, preventing SQL injections.

$wpdb->query – any query function

The $wpdb->query method is used mainly for SELECT and DELETE statements but can actually be used for any SQL statement.

$wpdb->query($wpdb->prepare ("DELETE FROM $wpdb->custom_table WHERE ID = 1" ));

17) In WordPress, objects are passed by value or by reference.

In WordPress, all objects are passed by value.

18) Explain Avatar and Gravatar in WordPress.

When browsing different web sites, you may notice that many users have a picture next to their name. These pictures are called “avatars.” WordPress, however, uses a specific type of avatar called “Gravatars“–short for “Globally Recognized Avatar.” ... WordPress integrates Gravatars into every WordPress site.

19) What is User Meta in WordPress?

It allows developers to store additional information about registered users in the WordPress database.

20) What is a child theme in Wordpress?

A child theme is a theme that “get the functionality and styling of another theme, called the parent theme.” Child themes are recommended to modify existing themes while still maintaining their design and code.

These themes provide a way for designers or developers to create new designs that inherit the functionality of a parent theme. For us at Woo, that means we can release a bunch of fresh new designs that are all based on our robust and reliable WooCommerce parent theme.

21) What are cookies and its type?

A cookie is a text-only string of information that a website transfers to the cookie file of the browser on your computer's hard disk so that the website can recognize you when you revisit and remember certain information about you. This can include which pages you have visited, the choices you have made from menus, any specific information you have entered into forms and the time and date of your visit. There are two main types of cookies:

Session cookies: these are temporary cookies that expire at the end of a browser session; that is when you leave the site. Session cookies allow the website to recognize you as you navigate between pages during a single browser session and allow you to use the website most efficiently. For example, session cookies enable a website to remember that a user has placed items in an online shopping basket.

Persistent cookies: in contrast to session cookies, persistent cookies are stored on your equipment between browsing sessions until expiry or deletion. They, therefore, enable the website to "recognize" you on your return remember your preferences and tailor services to you.

In addition to session cookies and persistent cookies, there may be other cookies that are set by the website which you have chosen to visit, such as this website, in order to provide us or third parties with information.

22) How to set a global variable in wordpress functions.php?

You can use WordPress default functionality like global $wpdb to set a global variable

Example :

global $blog_pageId; 
$blog_pageId = 34;

Then one can call it by

$blog_pageId = get_blog_page_id();

23) How safe is your website on WordPress?

WordPress is basically safe. It is created by a group of well-trained developers, which review the code every day. If they find a bug, they report it or fix it. So there is a chance, that every security issue will be fixed before somebody will try to use it.

24) Where WordPress content is stored?

WordPress Stores data in two locations

  1. An MYSQL database: pages and posts are stored in the MYSQL database.
  2. The File system: WordPress stores uploaded images and media in the file system.

25) What is difference between Page and Post in Wordpress?

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.

26) What are hooks in Wordpress. Enlist few?

Hooks are functions that can be applied to an Action or a Filter in WordPress. These functions can be modified by theme and plugin developers to change the default WordPress functionality.

Two types of hooks:

  • Action hook
  • Filter hook

27) What is an action hook?

Action Hooks are a very useful tool in WordPress and they are used to perform functions (actions) in specific places of a theme or plugin. Many themes and plugins, such as Total, use action hooks as an easy way for users to modify the output of the project or to add their own custom code.

28) What is an filter hook?

Filters are passed code or markup by their filter hooks; they modify what they are passed, and must return the result back for WordPress to use in its regular processing. A Filter in WordPress allows you to 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.

29) What is default table prefix for wordpress?

The default table prefix is wp_ or WordPress.

30) What is use of wp_head() function in WordPress?

The wp_head() function introduced in WordPress 1.2.0, it fires the wp_head action that adds data to the <head> tag.

31) How many default tables are the WordPress, Can you list them?

There is 11 table in wordpress as :

  1. wp_options
  2. wp_users
  3. wp_links
  4. wp_commentmeta
  5. wp_term_relationships
  6. wp_postmeta
  7. wp_posts
  8. wp_term_taxonomy
  9. wp_usermeta
  10. wp_terms
  11. wp_comments

32) Which 'meta box' is not hidden by default on Post and Page screens?

‘Featured Image’ meta box that is not hidden by default on Post and Page screen.

33) 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 the blog template.

Below is 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()

34) How to get website url in wordpress?

Function named get_site_url() is used to get website url in wordpress.

35) What is wp_enqueue_script() function in WordPress?

wp_enqueue_script() is the function that tells WordPress to “add on”—enqueue—a new JavaScript file for addition into WordPress.

36) What is the difference between the wp_title and the_title tags?

wp_title() function is for use outside the Loop to display the title Of a Page.

the_title() on the other hand is used within the Loop.

37) How to check if a page exists by URL in Wordpres?

Get_page_by_path() function is quite handy in such a case that retrieves a page given its path.

38) What do next_posts_link() and previous_posts_link() function do?

next_posts_link() usually points to older entries (toward the end of the set) and previous_posts_link() usually points to newer entries (toward the beginning of the set).

39) How to get session in Wordpress?

$wp_session = WP_Session::get_instance() can use to get session in wordpress.

40) What is the difference between wp_reset_query() and wp_reset_postdata() in WordPress?

Both wp_reset_query() and wp_reset_postdata() reset the query object by restoring the global $post variable, but wp_reset_query takes it a step further and actually destroys the previous query before doing so.

41) What is __() in WordPress?

__() and _e() are the simplest functions: they return or echo the translated string. Their usage should be obvious: one string, one translation.

42) What is WordPress loop?

The Loop is a PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post.

The Loop displays the following information by default for each post:

  • Title (the_title())
  • Time (the_time())
  • Categories (the_category()).

43) Does WordPress use cookies?

WordPress uses cookies for two purposes:

  1. Registered members need a cookie to be able to log in. This is 'strictly necessary' as WordPress won't work without it.
  2. Visitors who leave a comment on a blog post will also have a cookie set on their computer. This is not "strictly necessary" as it's a user preference.

44) What are Tags in WordPress?

Tag is one of the pre-defined taxonomy in WordPress. Users can add tags to their WordPress posts along with categories. However, while a category may cover a broad range of topics, tags are smaller in scope and focused on specific topics. Think of them as keywords used for topics discussed in a particular post

45) How do you enable debug mode in WP?

To enable debugging mode, add the following line to the wp-config.php file: define('WP_DEBUG', true); When this setting is enabled, WordPress displays all PHP errors, notices, and warnings.

46) Which is the considerably best multilingual plugin in WordPress?

Wordpress is used by millions of non-English websites around the world. We can use WordPress to create a website in any language of our choice. TranslatePress is the considerably best multilingual plugin in WordPress. It is a full-fledged WordPress multilingual plugin to translate every aspect of our website. The main feature of TranslatePress is that it allows you to translate directly from the front-end.

47) How to improve security on a WordPress site.

We can improve security on a WordPress site following method:-

  • Don't use “Admin” as your administrator username.
  • Pick strong passwords (long, with numbers, capital letters, and symbols)
  • Use 2-factor authentication for login.
  • Disable login hints.
  • Download plugins only from known resources.

48) What is _e() in WordPress?

It is a WordPress Function used for localization. The function __( 'My Text', 'my-text-domain' ); assigns a string "My Text" that is translateable. 'my-text-domain' is the text-domain the string is referenced to. This function does not echo anything!

The function _e( 'My Text', 'my-text-domain' ); is almost the same but it echoes your string directly.

49) What is short Code in Wordpress?

A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut.

Example of Shortcode : [dailymotion], [flickr],[audio],[instagram],[gallary] etc

50) How many number of pages we can create in WordPress?

There is no limit to the number of posts or pages you can create in a free hosted WordPress.com blog. The support documentation is all found at the Support link http://en.support.wordpress.com which is also on the bottom of your Admin page. You can create a custom menu and add Pages and sub-pages to it.

3 comment(s) :

  •   Reply
    img

    Z.A. Corbett

    13th Apr, 2020
    "These are best interview questions to ask a wordpress developer and check theoretical knowledge of Wordpress dev. Please add some coding questions.
  •   Reply
    img

    Jigar bhanushali

    19th Apr, 2020
    "Nice one but it is not enough information
  •   Reply
    img

    Sumit

    20th Apr, 2021
    "Appreciate you Wordpress interview test questions. Best interview Questions for interviews. Sharing this with my team.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.