Wordpress developer interview questions: WordPress is a free, open-source CMS written in PHP.
WordPress is an open source CMS written in PHP.
Q:- What is the different between wordpress.com vs wordpress.org?
wordpress.com
WordPress.com (fully hosted), focus on your beautiful content, and let us handle the rest. it has limitations when it comes to plugin, theme customization etc
wordpress.org
WordPress.org (self-hosted), get your hands dirty, and host your website yourself. it provides more flexibility when it comes to plugin, theme customization etc
Q:- What is the use of WordPress?
- WordPress is a free and open-source blogging tool and a content management system (CMS) based on PHP and MySQL. Features include a plugin architecture and a template system.
- WordPress was used by more than 23.3% of the top 10 million websites as of January 2015.As of February 2016, WordPress is used by 59.1% of all the websites whose content management system we know. This is 25.8% of all websites.
Q:- What is the features of WordPress?
Following are some of the important features that we think that you’ll love.
- Simplicity
- Easy Installation and Upgrades
- Flexibility
- User Management
- Media Management
- Easy Theme System
- Extend with Plugins
- Built-in Comments
- Search Engine Optimization
- Multilingual
- Importers
- Community
- Publish with Ease
- Publishing Tools
You may also like Core PHP Interview Questions
Q:- What are the developer features in a WordPress?
For developers, WordPress Have lots of goodies packed under the hood that you can use to extend WordPress in whatever direction takes your fancy.
- Plugins
- Themes
- Application Framework
- Custom Content Types
- The Latest Libraries
Q:- Why you should use WordPress?
WordPress is that it's easy to use and flexible enough for just about anything. That's the main reason why WordPress has grown so much in popularity. According to a recent survey, WordPress powers 22.5% of all websites on the internet.
Let's take a look at why you should use WordPress.
- WordPress is Free
- Easy to Use and Learn
- Extendable by Using Themes and Plugins
- Search Engine Friendly
- Easy To Manage
- Safe and Secure
- WordPress Can Handle Different Media Types
Q:- In what ways you can use WordPress?
WordPress can be used in many different ways. It is open to possibilities.
You can use WordPress as the following:
- Blog
- CMS
- Gallery
- Portfolio
- Rating Website
- E-Commerce
- Media Site
- Membership Site
Q:- What is the plugins in WordPress?
Plugins are ways to extend and add to the functionality that already exists in WordPress.. Plugins then offer custom functions and features so that each user can tailor their site to their specific needs.
Q:- What are the rules that you have to follow for WordPress plugin development?
- Create a unique name
- Create the plugin's folder
- Create a sub-folder for PHP files, translations and assets
- Create the main plug-in file and fill in header information
- Create activation and de-activation functions
- Create an uninstall script
- Create a readme.txt file
- To detect paths to plugin file use proper constants and functions
Q:- How to run database Query in WordPress?
$wpdb->query("select * from $wpdb->posts where ID > 10");
Q:- 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".
Q:- How to secure your wordpress website?
You can secure your wordpress website by using following things:
- Use Secure Hosting
- Don't Use Nulled Themes
- Install a WordPress Security Plugins
- Always Use Strong Password
- Disable File Editing
- Install SSL Certificate
- Change your WP Login URL
- Limit Login Attempts
- Update your WordPress version
You may also like MySQL Interview Questions
Q:- What is the default table prefix in WordPress?
By default, wp_ is the table prefix, if required you can change it at the time of installation.
Q:- Plugin for Multi-language features?
WPML Multilingual Plugin.URL: https://wpml.org/
Q:- Alternative CMS of WordPress?
- Drupal
- Joomla
Q:- How to turn off the Notice/Warning from my wordpress website?
Open the wp-config.php file and WP_DEBUG set the false.
define('WP_DEBUG', false );
Q:- What is use of __() and _e() functions in Wordpress?
These are the function used when you website multilingual, each of this function has two parameters.
1st parameter: String which you want to convert from one language to another.
2nd parameter: domain name.
Q:- How to check admin login or Not?
if(is_admin()) {
// write your logic here
}
Q:- How to get the current page name in WordPress?
You can get the page name from below of two?
$slug = basename(get_permalink());
OR
$pagename = get_query_var('pagename');
Q:- What is Hooks in WordPress?
Hooks allow the user to create a WordPress theme or plugin with shortcode without changing the original files.
Q:- What are the types of hooks in WordPress?
Following are two types of hooks
- Action hooks: This hooks allow you to insert an additional code.
- Filter hooks: Filter hooks will only allow you to add a content or text at the end of the post.
Q:- What types of hooks in wordpress is used?
1) Actions hooks:.
- has_action()
- add_action()
- do_action()
- do_action_ref_array()
- did_action()
- remove_action()
- remove_all_actions()
- has_filter()
- add_filter()
- apply_filters()
- apply_filters_ref_array()
- current_filter()
- remove_filter()
- remove_all_filters()
Q:- How can you backup your WordPress content?
Go to WordPress: admin -> Tools -> Import
Q:- List most commonly functions used in wordpress?
- wp_nav_menu() :- Displays a navigation menu.
- is_page() :- To check if this is page OR NOT, will return boolean value.
- the_title():- Displays the title of the post in website.
- the_content():- Displays the contents of the post in website.
- get_the_excerpt() :- Copy the excerpt of the post into a specified variable.
- in_category() :- Check if the specified post is assigned to any of the specified categories OR not.
Q:- What are the file structure in wordpress?
Following are main files which used in wordpress
- index.php :- for index page.
- search.php :- For display the search result page.
- single.php :- for single post page.
- page.php :- display the static pages.
- category.php :- Display the category page.
- tag.php :- For display the tags page.
- author.php :- For display author page.
- taxonomy.php :- For display the taxonomy archive.
- attachment.php :- For managing the single attachments page.
- header.php :- For managing top part of page.
- footer.php :- For manage bottom part of pages.
- archive.php :- For archive page display.
- 404.php :- For display 404 error page.
Q:- What is name of function which is used to register a shortcode handler?
add_shortcode
It has two parameter, first is shortcode name and second callback function.
#Example:
add_shortcode( 'shortcode', 'shortcode_handler' );
Q:- How to create shortcode in wordpress? Give working example?
You can use following syntax:
add_shortcode( $tag , $func );
function customtag_func( $atts, $content = "" ) {
return "content = $content";
}
add_shortcode( 'customtag', 'customtag_func' );
Use: [customtag]content[/customtag]
Ref Link: https://codex.wordpress.org/Function_Reference/add_shortcode