Wordpress Interview Questions

Wordpress Interview Questions | Freshers & Experienced

  • Calvin
  • 12th Feb, 2021
  • 334 Followers

About Wordpress

Nowadays, the Internet is a vast source of information. But, have you ever thought how the information is added on the Internet and by whom? Well, if you are reading this, then you are going to have the answer. Bloggers, the ones who write blogs, are the cause of data on the internet. They add their own experiences in the form of data on the websites which is viewed by the users. Now, the question arises, where the bloggers write their content so that it is visible to the users. Here, we present you a solution that will help you to write your blogs as well as to make attractive websites.

WordPress is an open source web software and self-hosted blogging tool which you can use to create astonishing blogs and websites. In today's date, it is used by millions of users to build their own websites. Besides creating websites, WordPress offers you privacy with protected passwords, easy importing, themes, and plugins, etc. If you want to know completely about WordPress, then check our online interview questions and get updated about each small concept.

Key Features of Wordpress

Below are few major features of Wordpress

Easy Theme System

Publish with Ease

Full Standards Compliance

Easily Extendable with Plugins

Built-in Comments system

Search Engine Optimized

Easy Installation and Upgradation

Open Source

Full User System

Wordpress Interview Questions

Q1. What is WordPress?

WordPress is an open-source software used for website creation and blogging. It is totally free, can download from wordpress.org. It is also called a website content management system (CMS). It is written in PHP Programming language and a powerful solution for creating a blog and content creation website.

Q2. What are basic requirements to install Wordpress?

Basic requirements for installing Wordpress

  • PHP (Version 7 or higher version).
  • MySQL (5.6 or greater version).
  • 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.

Q3. Enlist few advantages of using WordPress?

Below are the few advantages of using Wordpress.

  • Easy to use and Install
  • 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 (Search Engine Optimization) 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 convenient syndication.
  • Responsive Web Design

Q4. What is difference between wordpress.com and wordpress.org?

The basic difference between wordpress.com and wordpress.org is

Wordpress.Org: We can host our own blog or website with worpress.org. From wordpress.org we can download free software. We can create our own website by writing codes in software.

Example: https://xyz.com

  • Different plugins can upload to downloaded software.
  • You have access and can customize all backend code, database, files
  • Can upload your free, premium or custom themes to customize your website.

WordPress.com: On the other hand is not free. We need to pay for hosting or wordpress.com extension will be added to our website address.

Example: https://xyz.wordpress.com

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

Q5. In which year WordPress was released?

The first version of WordPress was released in the year 2003.

Q6. Enlist different types of user roles available in WordPress?

Wordpress users can be a subscriber, contributor, author, editor or administrator.

Subscriber: A subscriber is a regular user of the website. They can log in to your WordPress website, update their profiles and change their passwords also they can view posts or leave a comment. They are not able to write posts, view comments, modify the WordPress theme or anything else inside your WordPress admin area.

They will be allowed to enroll for Email subscriptions like newsletters and promotions.

Contributor: For getting recognition by contributing their work on a website a contributor can add a new post, edit their post but they cannot publish any post, not even their personal ones. They are not allowed to access the admin functionalities like altering the website design, uploading the plugins or creating new categories.

They can view comments but cannot alter or delete them. They can not to upload any external files on the website, not even the images for their posts.

Author: The role of an author is to write, edit and publish their posts. They are allowed to upload media files to use within their posts.

They cannot create any new categories. They can choose only an existing category and create new tags for their posts. They can view all the comments but, they cannot alter, approve or delete any comments. The author does not have permission to change the theme, plugin and other settings of the website.

The author can delete their posts at anytime this is the biggest disadvantage. Even if authors are paid to publish posts they can delete at any time.

For that, we can keep a WordPress backup for our website.

Editor: The editor handles the content of your website. The editor have complete access to the contents of the website they can do anything with the contents. They can add, edit, publish and delete any posts from our WordPress website, even the ones written by others (Author, Contributor, Admin). An editor can view all the comments and also can alter, moderate and delete them as well.

They have access to all contents of the website, but the editor cannot change the site's settings, remove or change plugins or add any new users.

Administrator: This is the most dominant role and is mainly reserved for the site owners only. An administrator, can add, edit and delete any post on the website. Including posts by editors, authors, and contributors as well.

He can change the structure of the website including its theme, plugins, and other user settings. An administrator can create new users and modify and delete any existing ones including other administrators also.

Administrators does have a full hold over the website and thus regarded as the most powerful role of a WordPress website.

When you are working with a multi-partner WordPress website. In such a case, you should keep the proper legal documents to prevent any future dispute.

Q7. Why is MySQL used mostly with WordPress?

WordPress uses MySQL as its main database management system. It stores and get almost all of its information like user-profiles and credentials and post contents etc., in MySQL databases. MySQL is open-source and is a part of LAMP (Linux, Apache, MySQL, PHP ) development stacks turn it out to be the default database choice for WordPress.

Q8. What is the use of general setting in Wordpress?

WordPress's general setting is used to set/update the basic configuration settings for our site. Using this setting you can modify the following fields or information about the website.

  • Tiltle of site (Site title ): It indicates site name in the template header.
  • Tagline: Tagline refers short sentence about your site.
  • WordPress Address (URL): All core application files are present in URL of WordPress directory.
  • Site Address(URL): Enter your site URL to display on the browser.
  • E-mail Address: Enter your e-mail address, it is required to recover your password or any update.
  • Membership: Anyone can register an account on our site as a member of site.
  • New User Default Role: The default role is set for the newly registered user or members.
  • Timezone: We can set the time zone based on the particular city to display on the site.
  • Date Format: The date format can set to display on the site.
  • Time Format: The time format as you need to display on the site can set.
  • Week Starts On: By default week day starts from Monday. We can set week day as we need to disply on site.
  • Site Language: We can set the language for the WordPress dashboard.

Q9. What are plugins in Wordpress?

Plugins are pre-written code that provides specific functionality to the WordPress website. It is like a little piece of software that we can add to make our website better. It usually consists of several folders that contain PHP files and uploaded to the wp-content/plugins directory. Plugins allow us to add features to our website without knowing a single line of code.

Site administrators can install/uninstall plugins from the admin area. Plugins should be installed and activated before work. We can also download and manually install them using an FTP client.

Q10. What is Permalink in WordPress?

Permalinks are the permanent URLs to our website pages and blog post. A Wordpress permalink is the non-changeable web address used to link to your content. The URL to each post will be permanent and will never change — hence the name permalink. If we open this URL from anywhere it will show the same content.

Q11. What is a custom field in WordPress?

Custom fields are a feature in WordPress which allows users to add additional information about the post or user.

An Example of custom fields can be:

Suppose we traveled somewhere and want to store some extra information about the place in the post like weather, date and time or something else, we can add as a custom field

  • The weather was sunny, rainy or cloudy, etc.
  • Date and time of your travel.

Q12. Which SEO plugin you use for Wordpress SEO?

Yoast SEO plugin is the best WordPress SEO plugin in the market. It gives 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 makes an XML sitemap for all your website content. So it makes search engines easier to crawl your website posts or pages.

Q13. How can you disable comments in WordPress?

To disable comments in WordPress follow the following steps

  • Go to Settings then click on the discussion tab present at the left sidebar of your WordPress admin panel.
  • Uncheck the option - allow people to post comments on new articles.
  • To store your settings click on the save changes button. Comments will get disabled for all your future posts.

Q14. What are importers in WordPress?

An importer is a migration tool in WordPress, that allows us to migrate content from an already existing WordPress site to another.

Importers can import the following content from a WordPress export file:

  • Posts, pages, and other custom post types.
  • Comments.
  • Custom fields and post metadata.
  • Categories, tags, and terms from custom taxonomies
  • Authors

Q15. What is a WordPress taxonomy?

Taxonomy refers to the way of grouping selected posts together. By default, there are two taxonomy types Categories and Tags are available in Wordpress. But just like any other taxonomy, these can be removed or changed and you can even add more taxonomies if you need it. With a small amount of code, you can create your own taxonomy.

Q16. How to run database Query on WordPress?

There is a built-in object class that deals with database queries in Wordpress. It is wpdb and it is 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.

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

    $wpdb->query('select * from posts');
    

    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" ));

Q17. In WordPress, objects are passed by value or by reference.

In WordPress, objects are passed by value.

Q18. Explain Avatar and Gravatar in WordPress.

When browsing different web sites, we notice that many users have a picture next to their name. These pictures are called avatars. While WordPress uses a specific type of avatar called Gravatars (Globally Recognized Avatar). WordPress incorporates Gravatars into every WordPress site.

Q19. What is User Meta in WordPress?

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

Q20. What is a child theme in Wordpress?

A child theme is a theme that gets the functionality and styling of the parent theme. Child themes can modify existing themes; maintaining their design and code. These themes provide a way for designers or developers to create new designs that acquire the functionality of a parent theme. The child theme can be created by mentioning the name of the parent theme which is stored in the parent theme directory.

Q21. What are cookies and its type?

A cookie is a piece of information in the form of a string, which website transfers to the cookie file of the browser on our computer's hard disk so that the website can recognize us when we revisit and remember certain information about us. This can include which pages we have visited, the choices we have made from menus and specific information we have entered into forms and the time and date of our 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 we leave the site. Session cookies allow the website to recognize us as you navigate between pages during a single browser session and allow us to use the website most efficiently. Session cookies enable an e-commerce website to remember that a user has placed items in an online shopping cart. When we open new page items added to the cart remain there.
  • Persistent cookies: Persistent cookies are stored on our equipment between browsing sessions until expiry or we should clear those cookies. They, therefore, enable the website to "recognize" us on our return, remember our preferences and tailor services to us.

There are other cookies that remember after our visit to a particular website and also give third parties information.

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

Use the global keyword before the variable name to create or set a global variable in Wordpress.

Example

global $page_id; // declaring global variable
$page_id= 12; // setting glogal variable
$my_pageId = get_page_id(); // getting global variable

Q23. How safe is your website on WordPress?

WordPress is very safe to create websites. It is made by a group of well-trained developers, which review the code every day. If they find a bug, they fix it or report it immediately. So there is a chance, that every security issue will get fixed before somebody will face it.

Q24. Where WordPress content is stored?

WordPress Stores data in two locations:

  • In MYSQL database: Data of pages and posts, users are stored in the MYSQL database.
  • In File system: WordPress stores uploaded images and media in the file system

Q25. What is difference between Page and Post in Wordpress?

Posts and Pages are the two content types in WordPress.

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, such as about us, contact us page, etc. They are permanent and timeless entries.

Q26. What are hooks in Wordpress. Enlist few?

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

Below are few hooks avaialable in Wordpress

wp_enqueue_scripts, wp_head, dynamic_sidebar, wp_footer, shutdown, get_the_guid,parent_edit_pre,password_edit_pre

Q27. What is an action hook?

Action hooks are used to perform actions in specific places of a plugin or theme. Many themes and plugins, use action hooks as an easy way for users to make changes in the output of the project or to add their own custom code.

Q28. What is an filter hook?

Filters hook modify what they are passed and must return the result back for WordPress to use in its regular processing. It allows us to get and modify WordPress data before it is sent to the database or the browser. Some examples of filters would be customizing how excerpts are displayed or adding some custom code to the end of a blog post.

Q29. What is default table prefix for wordpress?

The default table prefix is wp_ for WordPress.

 

Q30. What is use of wp_head() function in WordPress?

The wp_head() function was introduced in WordPress 1.2.0, it fires the wp_head action that adds data to the tag of the page.

Q31. How many default tables are the WordPress, Can you list them?

There are 11 default tables 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

Q32. Which 'meta box' is not hidden by default on Post and Page screens?

'Featured Image' meta box is not hidden by default on Post and Page screen in Wordpress.

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

In WordPress, template tags are nothing but PHP functions that are used to display information dynamically or customize a 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()

Q34. How to get website url in wordpress?

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

Q35. What is wp_enqueue_script() function in WordPress?

wp_enqueue_script() function is used to add/ link a script file on wordpress.

Syntax

wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );

Q36. What is the difference between the wp_title and the_title tags?

wp_title() and the_title() both are filter hook in Wordpress.

wp_title() is used to display/ filter the title of page while the_title() is used with loop.

Q37. How to check if a page exists by URL in Wordpress?

get_page_by_path() function of Wordpress is used to easily check whether a page exists by URL in Wordpress.

Q38. What do next_posts_link() and previous_posts_link() function do?

next_posts_link() and previous_posts_link() function of Wordpress are used in pagination. next_posts_link() is retrives an order post of a category or tag while previous_posts_link() is used to retrive previous/ newer entry of post.

Q39. How to get and set session in Wordpress?

In Wordpress, we can use global $wp_session; to set can get sessions.

Check below example

 global $wp_session; 
// setting session in WordPress 
 $wp_session['job_id']=95;

// getting a session in WordPress 

echo $wp_session['job_id']; //95

Q40. 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.

Q41. What is __() in WordPress?

__() and _e() are the simple functions that return or echo the translated string. These functions can be used to translate a string to other languages. It should be one string; one translation.

Syntax:

__( string $text, string $domain = 'default' )

Q42. What is WordPress loop?

Wordpress Loop is PHP code used by WordPress to display posts. WordPress keeps the style and format same for each post as specified within the Loop tags. HTML or PHP code in the Loop will be applied to each post.

The following information we need to display in Loop for each post:

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

Q43. Does WordPress use cookies?

Yes, WordPress uses cookies to remember the user's activities on the website.

Q44. What are Tags in WordPress?

WordPress consists of some predefined taxonomy one of them is the Tag. Along with categories users can add tags to their WordPress posts. A category may cover a broad range of topics while tags are smaller in scope and focused on specific topics.

Q45. How do you enable debug mode in WP?

To enable debugging mode in WordPress, add the following line to the wp-config.php file:

define('WP_DEBUG', true);

When the above setting is enabled, WordPress displays all PHP errors, notices, and warnings.

Q46. Which is the considerably best multilingual plugin in WordPress?

Wordpress is used by many non-english websites around the world. We can use wordpress to create website in any language of our choice. TranslatePress is the considerably best multilingual plugin in wordpress. It is 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.

Q47. How to improve security on a WordPress site?

To improve security in wordpress we should follow the following steps:

  • Don't use "Admin" as your administrator username.
  • Pick strong passwords which will be long and includes numbers, capital letters, and symbols.
  • Use 2-factor authentication for login.
  • Disable login hints.
  • Download plugins/themes only from known resources.

Q48. What is _e() in WordPress?

_e() is a WordPress Function used for localization and for translation.

The function __( 'My Text', 'my-text-domain' ); assigns a string "My Text" that can be translated. 'my-text-domain' is the text-domain the string is referenced to. This function does not echo anything!

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

Q49. What is short Code in Wordpress?

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

Example of Short code : [dailymotion], [flickr],[audio],[instagram],[gallary] etc.

Q50. 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. We can create a custom menu and add Pages as well as sub-pages to it.

Difference between Wordpress and Blogger

WordPress

Blogger

The services of WordPress are provided by the WordPress hosting provider

It is provided by Google.

As WordPress is an open and large source, you can perform several tasks on your site.

It provides a lesser number of features to added into the site.

It Provides a great number of template and allows you to make your site more professional.

It provides a limited set of templates.

It is very easy to move the site from WordPress to another platform

It is quite complex to move the site from Bloggerr to another platform

It is self-hosted so you need to check security and backups.

It is hosted by Google so the security is robust. There is no need to take care of security. Google will do it by itself.

There are very huge supports available for WordPress.

Blogger has a very limited support system

Pros of using Wordpress

  1. Great content management system. It is very easy to navigate through the pages and content in WordPress. You can easily understand the procedure of WordPress. If you are able to understand computers and the languages on a basic level then WordPress is best for you.
  2. Plugins A large number of plugins (free as well as paid) are available in the market for WordPress which helps you to customize and improve any WordPress site. In most of the cases, plugins can do changes in the functionality on your site on your will.
  3. Responsive A vast number of themes are available in WordPress which are very good at the time of being responsive.
  4. eCommerce sites. Nowadays, eCommerce is getting at a high level. People find it easy to buy and sell things online. Plugins like WooCommerce played a vital role in this field. If your content is optimized then you can bring more people to your brand which results in heavy traffic on your website. It also tells the users which particular word can bring more popularity and which is not.
  5. Open source WordPress is an open source software which means anyone can use, change, study and redistribute its source code. You get a lot of themes and plugins in an absolutely free under the license of GPLv2. The programmers can also share the code online which results in saving a lot of time and costs.

Cons of Wordpress

  1. Custom Layouts Are Hard to Use: The first limitation is its layout. It is very hard to navigate them. It also happens with the design. Some designs are very hard to access as you want to do.
  2. Updates: It can be problematic to update WordPress. Although updates are a vital part and play a very important role but also it may bring some small problems to a website. The major problem of WordPress is security. Although the developers are good to keep updating it. But the site is only secure as the version is installed. Many owners failed to do the update and hence this may cause some serious issues.
  3. Speed: There are some themes that have plenty of useless generic code which results in a decrease in the speed of the site. Therefore, it induces a slow load time. It requires some experience to understand which code is necessary and which is just trash.
  4. Third Party content: Even most of the plugins are designed by professional developers, not all of them are of good quality. In most of the cases, it is harmful but sometimes it can be detrimental to your site. It may happen that the code can be conflicts with another site. It can break your site or become casually bloated. The latter can lessen the speed of the website.

About Author :

  • Author of Wordpress Interview Questions

    Calvin Carlo

    Calvin is a Senior web developer, a Javascript enthusiast, and a technical writer. He is very interested in learning new technologies and writing technical blogs on It. He loves playing Cricket, watching Hollywood action movies and is big fan of Michael Douglas.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.