1. What is WordPress?
A free, open-source software program, the WordPress content management system (CMS), is available online. You may manage their websites and the full process of producing and publishing web content with the help of this application. Even if you have no programming skills, you may use a content management system to manage the information on your website. WordPress makes it possible for anyone to construct a website, including those who aren’t programmers.

WordPress uses PHP and MySQL, which are supported by almost all web hosting companies. WordPress is a versatile content management system (CMS) that can be used for almost any form of website, including blogs, e-commerce, government, and commercial websites. WordPress is a fantastic option for both big and small websites because of its adaptability and usability.


2. What are some of the essential features of WordPress?
WordPress is a widely used content management system known for its essential features:

User-Friendly: Offers an intuitive interface for easy content creation and management.

Themes: Provides a wide array of customizable themes to style your site.

Plugins: Extend functionality with a vast library of plugins.

Content Management: Organises content effortlessly, including multimedia.

Blogging: Offers robust blogging capabilities with categories, tags, and comments.

SEO-Friendly: Supports SEO best practices for better search engine rankings.

Customization: Highly customizable to meet specific design and functionality needs.

Media Management: Streamlines media uploads and embedding.

Responsive design Ensures websites look great on all devices.

Multilingual Support: Allows content creation in multiple languages.

These features make WordPress an ideal choice for individuals and businesses to create and manage websites with ease and versatility.


3. What are WordPress Plugins?
WordPress plugins are small software extensions that you can add to your WordPress website. They add specific features and functionalities to your site, like contact forms, SEO tools, e-commerce capabilities, and more.

Plugins make it easy to customise and enhance your site’s performance without needing to code everything from scratch. You can find thousands of plugins in the WordPress plugin repository, and they’re an essential part of building a powerful and tailored WordPress website.


4. List some of the plugins that come with WordPress.
Based on actual downloads from WordPress.org, the top 10 WordPress plugins of all time are shown below.

Wordfence Security, Contact Form 7, and Yoast SEO
WordPress plugins such as Jetpack, Elementor, WPForms, and the All-in-One SEO Pack

WordPress Interview Questions


5. How do I create a plugin in WordPress?
Creating a plugin in WordPress involves these simplified steps:

  • Plan your plugin’s purpose and features.
  • Set up a development environment.
  • Create a plugin folder in wp-content/plugins.
  • Write the main PHP file with a header comment.
  • Add your plugin’s functionality using PHP.
  • Test and debug your plugin.
  • Create a readme.txt file for documentation.
  • Package your plugin in a ZIP file.
  • Distribute it through the WordPress Plugin Repository or other means.
  • Promote and offer support as needed.

6. What limitations does the WordPress website have?
WordPress has several limitations, including:

Complexity: WordPress can be complex for beginners, especially when customising themes and plugins.

Performance: Excessive plugins or poorly coded themes can slow down your site.

Security: WordPress is a common target for hackers; regular updates and security plugins are essential.

Customization: Extensive customization may require coding knowledge or hiring developers.

Maintenance: Regular updates, backups, and plugin management are necessary for site health.

Scalability: Complex, high-traffic sites may require advanced server configurations.

Learning Curve: It may take time to master WordPress’s full capabilities.

Resource Intensive: Some plugins and themes may consume more server resources.

Multilingual Support: While possible, multilingual sites can be tricky to set up.

Content Structuring: Custom content types may require extra effort to create and manage.


7. What is required to run WordPress?
To run WordPress, you need:

Web Hosting: A web server to store your website files and databases.

Domain Name: A unique web address for your site.

PHP: A server-side scripting language.

MySQL Database: For storing your website’s data.

Internet Connection: For managing and updating your site.

WordPress Software: Downloaded from WordPress.org or installed via your hosting provider.


8. How many tables are there by default in WordPress?
By default, WordPress creates 12 tables in its database. These tables store various types of data, including posts, pages, comments, users, and more, to manage the content and functionality of a WordPress website.


9. In WordPress, how can we change the table prefix (wp_))?
There are various ways to modify and rename the WordPress database prefix.

To change the default table prefix ‘wp_’, follow these steps in WordPress:

First method

Before Installation:

  • During the installation process, you can specify a custom table prefix in the wp-config.php file by adding the following line:

$table_prefix = ‘customprefix_’;

  • Replace ‘customprefix_’ with your desired prefix.

After Installation:

  • If you want to change the table prefix after installation, it’s more complex and risky. Back up your database first.
  • Use a plugin like “Better Search Replace” to replace the old prefix with the new one.

Changing the table prefix is a security measure to make it more challenging for hackers to target your database tables.

Second Method

Modify the database’s table prefix.

  • Open the database in PHPMyAdmin.
  • Choose every table that has the wp_ prefix.
  • To see a drop-down menu, click With selected. From the selection, choose Replace table prefix.
  • Put wp_ in the From field. Enter the new name in the To-field.
  • To make the adjustments, click Continue after that.

Third Method

Change the table prefix in wp-config.php

Open the wp-config.php file by going to the WordPress root directory. You can substitute any prefix you choose for the table’s “wp_” beginning, for instance, “wp_a564356_”. The line would therefore appear as follows:

$table_prefix  = ‘wp_a564356_’;


10. What are the basic steps we should take when our WordPress website is hacked?
If your WordPress website is hacked, take these immediate steps:

Isolate the Site: Take your site offline temporarily to prevent further damage.

Change Passwords: Change all passwords, including hosting, WordPress, FTP, and databases.

Scan for Malware: Use a security plugin to scan for and remove malware.

Update Software: Ensure WordPress, themes, and plugins are updated to the latest versions.

Check File Changes: Review and restore hacked files from backups.

Scan for Vulnerabilities: Use security tools to find and fix vulnerabilities.

Reset Keys and Salts: Generate new security keys and salts in wp-config.php.

Review Users: Delete suspicious or unauthorised user accounts.

Monitor Site: Continuously monitor for suspicious activities.

Implement Security: Install security plugins and take measures to harden security.

Seek Professional Help: If unsure, consult a security expert for assistance.

Remember, prevention is key, so regularly backup, update, and secure your WordPress site.


11. How to increase WordPress website security?
To increase WordPress website security:

Strong Passwords: Use lengthy passwords, and consider a password manager.

Update WordPress, your themes, and your plugins regularly.

Security Plugins: Install a reputable security plugin like Wordfence or Sucuri.

Two-Factor Authentication (2FA): Enable 2FA for added login security.

Limit Login Attempts: Implement a login attempt limit to thwart brute-force attacks.

Web Application Firewall (WAF): Use a WAF to filter malicious traffic.

Change Default Prefix: Change the default database table prefix.

Disable Directory Listing: Prevent directory listing in your.htaccess file.

Secure Hosting: Choose a hosting provider with robust security measures.

Regular Backups: Perform automated backups and store them offsite.

File Permissions: Set strict file permissions on your server.

SSL Certificate: Use SSL for encrypted data transfer (HTTPS).

Disable XML-RPC: Disable XML-RPC if not needed.

Disable Directory Listing: In your.htaccess file, disable directory listing.

Monitoring: Regularly monitor site logs for suspicious activity.

Login Lockdown: Implement login lockdown to prevent brute force attacks.

User Roles: Assign appropriate user roles and limit privileges.

Hotlink Protection: Prevent hotlinking to your images and content.

Disable PHP Execution: Disable PHP execution in untrusted directories.

Regular Audits: Conduct security audits and scans periodically.

Educate Users: Educate site users about security best practices.

Implementing these measures can significantly enhance the security of your WordPress website and protect it from potential threats and attacks.


12. What do you mean by posts and pages in WordPress?
In WordPress:

Posts are dynamic content entries displayed in reverse chronological order on your blog or website. They often include articles, news updates, and blog posts.

Pages are static, non-chronological content pieces used for permanent information like “About Us,” “Contact,” or “Services.” They don’t typically appear in your site’s main blog feed.


13. Can you create custom post types in WordPress?
Yes, you can create custom post types in WordPress. Custom post types allow you to define and organize content beyond the standard “Posts” and “Pages.” This feature is especially useful for structuring and displaying content like portfolio items, testimonials, products, events, or any other type of content specific to your website’s needs. Custom post types are typically created using code or with the help of custom post-type plugins.


14. Where is the WordPress content stored?
In WordPress, content is primarily stored in a MySQL database. The database contains tables that store information such as posts, pages, comments, user data, settings, and more. When a user visits a WordPress website, the content is retrieved from the database and dynamically displayed on the web pages.

Files like images, videos, and other media are typically stored in the server’s file system, while textual content and metadata are stored in the database. This separation of content from presentation allows for flexibility and ease of management in WordPress.


15. Are deactivated plugins likely to slow down WordPress websites?
No, deactivated or inactive plugins don’t make WordPress load slower. A WordPress plugin is simply turned off when it is deactivated. You can still enable the plugin on your website if necessary because it is still there.

On the other hand, uninstalling a plugin entirely deletes it from your website. Deactivated plugins that are preconfigured will be handled as if they didn’t exist. WordPress only loads active plugins.


16. What is a loop in WordPress?
In WordPress, the “loop” refers to a PHP code structure that retrieves and displays posts or content from the database. It is a fundamental element of how WordPress works and is used to dynamically generate and display posts on various templates such as the homepage, category pages, archive pages, and single post pages.

The loop typically includes functions like while, have_posts(), and the_post(), which work together to fetch posts one by one from the database and then display them according to the template’s structure. It allows for the automatic generation of content listings, making it easy to display blog posts and other content on your WordPress site without manual coding for each post.


17. How can comments be disabled in WordPress?
To disable comments in WordPress:

For individual posts or pages, edit and uncheck “Allow Comments” in the Discussion settings.

For multiple posts/pages, go to Settings > Discussion and uncheck “Allow comments on new articles.”

For media attachments, uncheck “Allow comments” in the attachment details.

To disable comments on existing content, consider using the “Disable Comments” plugin.

WordPress Job Interview


18. What are config files in WordPress?
In WordPress, config files, specifically the wp-config.php file, are crucial files that contain essential configuration settings for your website.

These settings include database connection details, security keys, table prefixes, and various other configurations necessary for WordPress to function correctly.

The wp-config.php file is a critical part of your WordPress installation, and any changes should be made with caution.


19. Is there any way to make other pages appear on the front page in WordPress?
You must take the following actions to turn your static page into a front page:

Select “Static Page” from the Admin Panel by clicking there.
Your front page can be chosen in the “Front page” section.
Your chosen page will now act as your home page by default.


20. Can you tell me how to create a page template?
A variety of uses for custom templates include changing the style of the main page or displaying special post types like news.

The theme folder should now contain a news.php file.
The news.php page should now include the get_header() and get_footer() functionalities.
Place them first. “News Template” is the new name of the template.


21. How do I update the WordPress website?
To update your WordPress website:

  • Back up your site.
  • Go to your WordPress dashboard.
  • Update the WordPress core, themes, and plugins from the respective menus.
  • Test your site to ensure it functions correctly.
  • Regularly check for updates and keep your site updated for security and performance.

22. What are the most exciting and useful features of WordPress?

  • Multilingual- available in more than 70 languages
  • Own data- no unwanted advert on your website
  • Flexibility and Easy publishing option
  • Easy to install and upgrade
  • In-built SEO engine
  • Free and easy theme selection
  • Flexibility

23. Explain pages in WordPress.

  • Pages are different from posts.
  • They are static, and they do not change often. You can add pages containing information about you and your site only.

24 What is a loop in WordPress?

  • WordPress uses PHP codes to display posts. This PHP code is known as a loop.

25. How can you disable WordPress comment?

  • You can disable the WordPress comment on the dashboard.
  • On the panel, under the options- discussion you find “Allow people to post the comment.” Uncheck this to disable comment.

26. Why does WordPress use MySQL?

  • Open source
  • Extremely fast
  • A widely available database server
  • Supported by low-cost Linux hosting

27 .Explain moderate comment in WordPress.

  • Comments by visitors on a post are not published directly unless the admin provides it.
  • It is called moderation. To change comment moderation setting, select Settings option from the dashboard and check the option Comment must be manually approved.

28. Explain Avatar and Gravatar in WordPress.

  • Word Avatar is used for a user’s profile image in online communications. Gravatar is a web-based service which allows its users to use the Avatar image

29. Explain the difference between WordPress Categories and Tags.

  • WordPress Categories are broad-ranging. It helps a user to identify about a blog. It is possible for a post to have more than one category. A post must have at least one category.
  • WordPress Tags are like categories, but they are used to describe a post more specifically. Tags are not necessary for every post.

30. Explain Tags in WordPress.

  • With the help of tags, similar posts can be grouped. Hence, it makes more comfortable for the users to search for a particular post.

31. How can you handle the situation if your WordPress site is hacked?

  • Install security plugins like WP security
  • Re-install the latest version of WordPress
  • Change password and user-ids for all your users
  • Check your themes and plug-ins are up to date

32. How to convert a category into the tag?

  • WordPress provides you an option to change category into tag and tag into a category. For this, you need to install Categories and Tags Converter from Import option under Tools section.

33. How to allow only registered users to comment on WordPress?

  • If you don’t want a comment from a new user on your blog, check the option “Users must be registered and logged in to comment” from Discussions under the Settings option.

34. Explain Categories in WordPress.

  • Categories allow a user to divide its content into different sections.
  • Different topics publishing on a single website can be divided into different groups.
  • It tells a reader what a post is about and they can easily find their content from a lot.

35. How can you edit a WordPress comment?

  • You can edit WordPress comment using the dashboard. From the panel, under the Comments option, select edit to edit a comment.

36. Explain posts in WordPress.

  • Posts allow you to write a blog and post it on your site. They are listed in reverse chronological order on the front page of your blog.

37. When was the WordPress released initially? 

  • WordPress was initially released on 27th May 2003 by Matt Mullenweg and Mike Little.

38. How many tables are there in WordPress by default?
At present version, there are about 11 tables in WordPress by default.

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

39. When is it announced as open source software?

  •  WordPress was announced as open source in October 2009.

40. What are the hooks? Define different types of hooks in WordPress.

  • Hooks enable users to create WordPress themes or plug-ins with shortcode without changing the original files.

There are two types of hooks

  • Action hooks
  • Filter hooks

41. What are the system requirements for installing WordPress?

  • Database – MySQL 5.0 +
  • Web Server – WAMP (Windows), LAMP (Linux), XAMP (Multi-platform), MAMP (Macintosh)
  • Operating System – Cross-platform
  • Browser Support – IE (Internet Explorer 8+), Firefox, Google Chrome, Safari, Opera
  • PHP Compatibility – PHP 5.2+

42. What is the difference between character 23 and x23?

  • 23 specifies the octal 23 and x23 determine the hex 23.

43. What is WordPress?

  • WordPress is an Open Source Content Management System (CMS) and a blogging tool, based on PHP and MySQL.
  • It is free of cost, and you can use it for any personal and commercial website.
  • WordPress is the most popular blogging system and used for more than 60 million websites.

44. What is by default prefix of WordPress tables?

  • The wp_ is by default prefix of WordPress tables.

45. What are the steps should be followed for installing WordPress?

  • 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.
  • Next step, please select your preferred language.
  • Next step, you see the information needed for the database before proceeding the WordPress installation.
  • Apply the details of your MySQL database.
  • WordPress checks the details provided by you and gives you a confirmation screen.
  • Next step, you have to Apply 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.’

46. In which cases, WordPress is not suitable for a website?

  • If the client is working on the non-CMS based project.
  • For sophisticated and innovative e-commerce sites.
  • Sites which require custom scripting solutions.

47. Which is considered more secured wordpress.com or wordpress.org?

  • WordPress.com is relatively more secure than wordpress.org because they limit the themes and does not allow plugin’s installation.
  •  Security depends on the hosting company of your website and also what steps they are taking to prevent the security problems.

48. How can you call a constructor for a parent class?

  • You can call a constructor for a parent class by this way:
  • Parents:: constructor($value)

49. Is it possible to SEO a WordPress site to show it on Google first page?

  • WordPress has an inbuilt SEO search engine benefit.
  • You can also have an additional plug-in in WordPress to help with SEO and rank on a favorite search engine like Google.

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

  • In WordPress, all objects are passed by value.

50. Is there any limitation for WordPress website?

  • Using several plugins can make the website heavy to load and run.
  • PHP knowledge is required to make modifications or changes in the WordPress website.
  • Sometimes software needs to be updated to keep the WordPress up-to-date with the current browsers and mobile devices. Updating 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.

 


51. Where is the WordPress content stored?
WordPress content is stored in the MySQL database on the Server.


52. What is default table prefix for WordPress database?
wp_ is the default table prefix for the WordPress database. Therefore, WordPress tables will look like ‘wp_posts’, ‘wp_users’ if you keep using default prefix.


53. What are the Popular plugins in WordPress for SEO?
Here are the most popular SEO plugins for WordPress.

  • Yoast SEO
  • All in One SEO Packs
  • The SEO Framework

54. What is a WordPress theme?
A WordPress theme is a group of files that defines the design of a WordPress website.

WordPress theme folder contains PHP (with HTML), CSS, JavaScript, and other kinds of files creates look and feel of the WordPress site. WordPress themes are kind of independent folders that can be installed and activated in any WordPress site.


55. What are commonly used WordPress theme functions?
There are many built-in WordPress functions that we use in theme customization. Here are some of the mostly used WordPress theme functions:

  • get_template_directory_uri() – Retrieve template directory URI for the current theme. In the event that a child theme is being used, the parent theme directory URI will be returned. Use get_stylesheet_directory_uri() to include resources that are intended to be included in/overridden by the child theme.
  • wp_head() – The wp_head action hook is triggered within the & section. You use this hook by having your function echo output to the browser in HTML head. Most of default actions into the ‘wp-head’ hook by WordPress core. You might use it to include your own js/css and other meta into the WordPress.
  • wp_nav_menu() – Displays a navigation menu created in the Appearance → Menus panel. For example: ‘Project Nav’ )); ?>
  • home_url()– The home_url template tag retrieves the home URL for the current site
  • e_()- Displays the returned translated text from translate()
  • get_sidebar() – Includes the sidebar.php template file from your current theme’s directory.
  • get_header()– Includes the header.php template file from your current theme’s directory.
  • wp_link_pages()– Displays page-links for paginated posts (Next page & Previous Page)
  • edit_post_link()– display link to edit current post from dashboard

56. Describe WordPress files and directory structure
Here is the list of important WordPress files & directory structure:

WordPress Root/

  • wp-admin/
    • css/
    • images/
    • other core PHP files…
  • wp-content/
    • plugins
    • themes
    • uploads
    • upgrade
  • wp-includes/
    • css/
    • images/
    • other core PHP files…
  • .htaccess
  • wp-config.php
  • wp-blog-header.php
  • other core PHP files

57. How to limit WordPress Post content length?
Sometimes, we only want to show initial WordPress post content on the site. There are many ways to limit the WordPress post content length. One way is to replace WordPress the_content() in WordPress template files with following code.

<?php$article_data = substr(get_the_content(), 0, 300);echo $article_data;?>

PHP


Explanation
get_the_content() function contains wordpress content page/post content. Then it will pass it to php substr() function to limit the content to 300 characters. Then you can display wherever you want.


58. Which function is used to get home URL in WordPress?
get_home_url(); and home_url(); functions is used to get home url in WordPress.

// Example to get home url$url = home_url();echo $url;// Output: https://example.com // Example to get url of any page using slug$url = home_url().’/about’;echo $url;// Output: https://example.com/about

PHP


59. Which are the necessary files for WordPress Theme?
The necessary files for WordPress theme are two for proper functioning:

index.php

  1. index.php
  2. style.css

These two files are minimum required files for proper working of WordPress theme.

As you can imagine, the first file index.php” deals with providing the contents to display while the second one “style.css” is used to establish the method through which these contents will be shown on the screen. WordPress first check “style.css” to identify the theme name & other information.


60. What is WordPress default feed cache recreation time? How to change it?
Default feed cache recreation time:
By default, WordPress feed cache recreation time or rather the cached feed has a lifetime of 43200 seconds, equivalent to 12 hours.

How to change it using the WordPress filter:
Change the default feed cache recreation period to 1800 seconds/30 minutes using wp_feed_cache_transient_lifetime filter

<?phpfunction return_cache_recreation( $seconds ){  return 1800;}add_filter( ‘wp_feed_cache_transient_lifetime’ , ‘return_cache_recreation’ );/* Ends: Change the default feed cache recreation period */?>

PHP


61. How to create A WordPress Global Options Page?
Thea dd_options_page() function adds sub menu page to the Settings menu.


Add Options Page Syntax
<?phpadd_options_page( $page_title, $menu_title, $capability, $menu_slug, $function);?>

PHP


Example of Options Page creation
add_action(‘admin_menu’, ‘my_plugin_menu’);function my_plugin_menu() {        add_options_page(‘My Options’, ‘My Plugin’, ‘manage_options’, ‘my-plugin.php’, ‘my_plugin_page’);}

PHP

WordPress Codex Reference: https://codex.wordpress.org/Function_Reference/add_options_page


62. How do WordPress plugins work?
A WordPress Plugin is a set of one or more functions, that specifies set of features at certain points using Plugin APIs Hooks.
Hooks allow your plugin to call functions at specific times to alter or enhance the existing functionality.
There are two kinds of hooks

  • Actions: In WordPress; an Action is a PHP function that is executed at specific points throughout the WordPress Core. For example: A developer may want to add code to the footer of a Theme. This could be accomplished by writing new function, then Hooking it to the wp_footer Action
  • Filters: In WordPress, a Filter is a function that is associated with an existing Action by specifying any existing Hook. Filters usually come with content already associated with them. They allow you to add or remove code from existing Actions.

Creating the Plugin folder with unique name
In this folder, we will create two files:

  • readme.txt
  • wp-plugin-name.php

The readme file is required if you want to host your plugin on the WordPress.org Plugin Directory.
File Headers
Now it’s time to put some information into your main Plugin PHP file. At a minimum, a header can contain just a Plugin Name, but several pieces should be included:

It is recommended that you prevent direct access to this file by including this line after your file headers:
Enqueueing JavaScript and CSS files
Make data available to JavaScript
Now we have some settings stored, we need to make them available to the JavaScript. “wp localize script” can be used to make any data available to your script that you can normally only get from the server-side of WordPress.
Activation and Deactivation hooks
register_activation_hook and register_deactivation_hook, run their callbacks on activation and deactivation of the plugin and perform the required functionality like adding or erasing the plugin’s metadata.

Why Do We Use Activation/Deactivation Hooks
We can create basic plugins without considering activation and deactivation functions. But advanced plugin will require these functions to provide additional features:

  • Create custom database tables on activation to store data and remove tables on deactivation.
  • Create custom options for plugins and activation and reset in deactivation.
  • Validate other dependent plugins on activation.
  • Any other necessary task you need to execute inactivation.

63. How to increase maximum execution time in PHP and WordPress
We mostly see that the maximum execution time of a PHP Script is 30 seconds. If a script takes more than 30 seconds to execute, it will throw the following Fatal error.
Fatal error: Maximum execution time of 30 seconds exceeded in ….

We can increase maximum execution time in PHP and WordPress by using various methods. In the following examples, we have increased maximum execution time to 360 seconds (6 minutes).
Method 1: By adding the code in a PHP file:
We can set the maximum execution time by adding this code in a PHP File. You must add this code in that file which is included earlier in all other pages. Then this function will increase maximum execution time in all those files.
For example, put this code in the header (header.php), or configuration (config.php) if available.
set_time_limit(360);
Method 2: Inside the .htaccess file:
We can do the same thing inside the .htaccess file as well. Before editing this file, you make sure to have a backup of .htaccess.
php_value max_execution_time 360
Method 3: Inside the php.ini file:
We can also set the maximum execution time by adding this code in the php.ini file.
max_execution_time = 360
Method 4: Inside wp-config.php file in WordPress:
If you are using WordPress then you can place this code in wp-config.php file.
set_time_limit(360);

Note: Note: These methods will only work if you are allowed to change PHP configuration by your Hosting Server.


64. What Menu position and order available in WordPress?
WordPress ‘menu_position’ or ‘position’ parameter is used to set menu position inside the Dashboard. This parameter used in register post type(), add_menu_page() and other WordPress functions.


List of Menu positions available in WordPress:

  • 5 – below Posts
  • 10 – below Media
  • 15 – below Links
  • 20 – below Pages
  • 25 – below comments
  • 60 – below first separator
  • 65 – below Plugins
  • 70 – below Users
  • 75 – below Tools
  • 80 – below Settings
  • 100 – below second separator

65. What is the difference between Posts & Pages in WordPress?
There are two common types of the content section in WordPress: Posts and Pages. Here we will read about the difference between these two content.


Difference between Posts and Pages in WordPress

S.NO Posts Pages
1 Posts have categories and tags The content in a post is published under a category or a tag. At least one category is mandatory but tags are optional in WordPress Posts. No categories and tags WordPress Pages can have a parent child relationship but do not have categories and tags.
2 Created frequently Posts can be added or created frequently. Not created frequently Pages are static content which doesn’t need to be added or created frequently.
3 Comments WordPress Posts usually have the commenting feature enabled. Comments WordPress Pages can have comments but the feature is usually disabled and are not generally used.
4 RSS feed available Posts are displayed in RSS field. RSS feed unavailable Pages are not displayed in RSS field.
5 Examples News, blog articles, tutorials, etc all come under WordPress posts. Examples About, Contact, etc all come under WordPress pages because once created, the content doesn’t need to be changed frequently.
6 Custom Formats Posts have custom formats of different types. These type of formatting is dependent on content type like image, video, quote, gallery, etc. Custom Formats Pages rarely have custom formats and if they have only templates are available.

66. What are the different user roles in WordPress?
WordPress user roles define what actions each user can perform on your website.

WordPress provides 6 pre-defined roles that site owner can set for each user.

  • Super Admin – This user has access to the site network administration features and all other features. User can install a new site, install themes, install plugins, add other users, create and edit any post or pages, and change all settings related to WordPress website. This user role is only available in WordPress Multisite Network.
  • Administrator  – This user can perform all the administration features within a single site. User can install themes, install plugins, add other users, create and edit any post or pages, and change all site settings.
  • Editor  – User with editor role can create and edit his posts and pages as well as of other users.
  • Author – This user can create and edit their own posts only.
  • Contributor – This user who can create and manage their own posts but cannot publish them. Only Higher level user can approve and publish contributor’s content.
  • Subscriber – This user can only manage their profile information. This role is helpful when you want to add users for Newsletter subscriber.

Additionally, you can add Custom User Roles via coding or plugin based on your requirement.


67. Which Gutenberg Blocks support Wide width and Full width alignment?
WordPress Gutenberg editor supports two width alignment options: Wide width and Full width.

Wide width: This option is used to align component on fixed or limited width (Somewhat similar to Bootstrap .container class).

Full width: This option is used to align component on full width (Somewhat similar to Bootstrap .container-fluid class).

There are following Gutenberg blocks that support these alignment width options.

  • Group Block
  • Cover Image Block
  • Image Block
  • Gallery Block
  • Pullquote Block
  • Video Block
  • Table Block
  • Columns Block
  • Embed Block

Note: These will work only if your theme supports. Also, this alignment options are useful for one column or full width page design as compared to page with sidebar.


68. Define WordPress
WordPress is the popularly used open-source Content Management System (CMS) tool for developing websites and blogs. It is built on PHP with MySQL and we can use it for personal and commercial website development. WordPress is licensed under GPL and it is available for free that is already being used by 60 million websites worldwide.


69. How secure is a website that is developed with WordPress?
The website developed with WordPress is safe and secure to operate and it is good for a website to be updated with the latest version of WordPress to avoid hacking and illegal access.


70. When was WordPress released initially and what is the latest version of WordPress?
WordPress was launched on 27th May 2003 by Mike Little and Matt Mullenweg and it was available as an open-source tool in October 2009. The latest and current version of WordPress is 5.9 and it was released in January 2022 with big updates and specialized features.


71. What are the system prerequisites for WordPress?
The system requirements for installing WordPress are as follows

  • Database: MySQL 5.0 or MariaDB 10.0 or above.
  • Web Server: WAMP for Windows, LAMP for Linux, XAMP for multi-platform, & MAMP for Macintosh
  • Operating System: Cross-Platform
  • Browser-Support: IE 8 & above, Firefox, Safari, Opera, and Google Chrome
  • PHP Compatibility: PHP 5.2+
  • HTTPS support is recommended and the mod_rewrite Apache Module

72. Explain the features of WordPress
WordPress is used to develop everything from simple websites like blogs to complex portals like enterprise websites and web applications. Following are the specialized features of WordPress

  • Simplicity and Flexibility
  • Publishing tools
  • In-Built Search Engine Optimized
  • User Management
  • Media Management
  • Easy Theme System Selection
  • Extensibility with Plugins
  • Own data – no unwanted advert
  • Multilingual Support with 70 languages
  • Easy Installation and Upgrades
  • Built-in Comments System
  • Custom Content Types

73. What are the major components in the home screen of WordPress?
The major components that are shown on the home screen of WordPress are as follows

  • Dashboard Menu that provides the navigation menu options for the media library, pages, posts, and comments on the left side of the screen
  • Screen Options display various types of widgets that can be shown or hidden on some screen. It also contains the checkboxes to show or hide various screen options to allow customization sections.
  • Welcome component to provide customization facilities by clicking the customize button.
  • Quick Draft is the component that includes a mini post editor used to write, save, or publish the post from the admin dashboard.
  • WordPress News is the component that displays the latest news about the software update of WordPress
  • Activity is the main component that shows the latest comments and recent posts and it allows users to reply, edit, delete, approve, or disapprove the comments.

74. Explain hooks and their types
Hooks allow users to create WordPress themes or plug-ins with shortcode without changing the original files and the following are the two types of hooks

  • Action Hooks that facilitate users to insert an additional code from an outside resource
  • Filter Hooks that facilitate users to add content or text at the end of the post

75. What are the reasons to use MySQL for WordPress?
Following are the reasons to use MySQL for creating a website with WordPress

  • Open-source database application
  • Extremely fast and easy access
  • Widely available database server
  • Low-cost Linux hosting support

76. List the default tables of WordPress
There are nearly 11 default tables in WordPress and they are as follows

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

77. What are the limitations of WordPress?
Following are the situations in that WordPress is not suitable or recommended

  • Non-CMS based website development project
  • Sophisticated and innovative e-commerce website developments
  • Websites that need custom scripting solutions

78. Define Posts in WordPress
Posts are the thing that allows you to write a blog or post it on your site and they will be listed in reverse chronological order on the front page of your blog.


79. Define Moderate Comment in WordPress
Visitors’ comments on a particular post will not be published directly until the admin permits it and it is known as moderation. We should select Settings Option from the dashboard and check the option to change the comment moderation setting to “Comment must be manually approved”.


80. Define Categories in WordPress
Categories enable users to divide its content into various sections with different topics published on a single website that can be divided into small groups. It shows a reader what a post is about and they can easily discover the content.


81. Define Tags in WordPress
Tags are used like posts that can be grouped to make it more comfortable for the users to search for a particular post. They are similar to categories with different options.


82. Explain the user types in WordPress
WordPress user role helps in accessing permission to the users of a WordPress site

  • Administrator with full rights over a site
  • Editor to deal with a content section of a website
  • Author to deal with posts and they can delete the post after publishing
  • Contributor who doesn’t have the right to publish their post or page and they need to send it to the administrator for reviews.
  • Subscriber is for users to log in and update their profile
  • A follower is a person that doesn’t have any right and they can read and comment on your post
  • Viewer is the one who can read and comment on a post.

83. Define WordPress Themes
WordPress themes are used to design the layout and appearance of your website in the front end. They are varied in many ways and are available for free and premium access. Free WordPress theme is to be compromised with the quality like many other sites using the same theme.


84. Explain WordPress plugins
WordPress plugins are programs developed in PHP scripting language that extends the functionality or added features to a WordPress site. They offer additional functions to an application.


85. Explain how to improve security in a WordPress site?
Security in a WordPress site is important as the websites are easy targets for hackers and a site can’t be perfectly secured but one can at least reduce the risk by implementing various security measures. Following are the measures to secure a WordPress site

  • Choosing a host
  • Strong password
  • 2 step login authentications
  • Limit the number of login attempts
  • Use SSL
  • Updated site

86. Explain the ways to optimize WordPress site performance
Increasing the speed of site optimization gives the best possible outcomes and improves the ranking of a website there are many ways to optimize a WordPress site and they are as follows

  • Utilize CDN
  • Utilize a caching plugin
  • Utilize a simple theme or framework
  • Updated website
  • Split long posts into smaller pages

87. Why is Backup significant?
Backup enables users to retrieve the site back if something goes wrong or if the site breaks. There are many possibilities for this like external attack, server down, or hacking. Users will lose all data on all the posts on the site and the backup is important to avoid it. Securing the backup is a crucial issue as we have to update the plugins and themes regularly in a specified interval. Using a strong username and password is important and the database name must be uncommon.


88. Explain the steps for backup of the database
All the posts, media files, comments, and metadata will be stored in the database. It contains the user’s information and all plugin settings. All the stored data will be personal and unique and if users lose them, they will be gone permanently. Following are the steps to take back up the database

  • Select the database that you have created at the installation of the WordPress application
  • Click on Export and use Quick when the database is small and use Custom for the large database.
  • If you choose custom, a table will be appeared, and select all the tables
  • Check out the output section and choose SQL from the format drop-down menu
  • Give tick to the checkbox named “Add drop table” and it is useful for overwriting the existing table
  • Give a tick to the checkbox named “If not exists” and it prevents errors when tables are already present in the database.
  • Then click go and the data will be saved in the system.

89. Explain Importers in WordPress
Importers are plugins that offer the functionality to import a bulk XML file with any number of records. It allows importing posts, pages, user data, custom posts, etc in an XML file.


90. List some of the template tags of WordPress
Template tags in WordPress are PHP functions used to display data dynamically or customized blog template. Following are the list of template tags popularly used in WordPress

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

91. List some of the action hooks and filter hooks in WordPress
Following are some of the filter hooks functions used in WordPress

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

Following are some of the action hooks used in WordPress

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

92. Define Child theme in WordPress
The extension of the parent theme is known as the child theme and if we want to make changes to the parent theme, we should update or undo the changes. The customizations are preserved on an update when we work on a child theme.

Back to list

Leave a Reply

Your email address will not be published. Required fields are marked *