Friday, 9 February 2018

Wordpress interview Questions&Answers

1.What are the types of hooks in WordPress and mention their functions?

There are two types of hooks 1) Action hooks 2) Filter hooks

 

Hooks allow user to create WordPress theme or plugin with shortcode without changing the original files. Action hooks allow you to insert an additional code from an outside resource, whereas, Filter hooks will only allow you to add a content or text at the end of the post.


2. what is custom field in wordpress  and folder structure ?

 The custom field in WordPress is a meta-data that allows the user to store the arbitrary information in the WordPress post. Using the custom field, other extra details can be added to the WordPress post.




3. How to run database query in wordpress ?
 

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

4.
What are the steps you can take if your WordPress file 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

5. What is plugin in wordpress and what are default plugins in wordpress ?

   WordPress Plugins are a piece of code that contains one or more functions written to extend and add to the functionality of an existing WordPress website.

The core of WordPress is designed to be lean and lightweight, to maximize flexibility and minimize code bloat. Plugins then offer custom functions and features so that each user can tailor their site to their specific needs.


Below is the list of plugins that comes with WordPress installation.

  • Akismet
  • Hello Dolly       

6.  What are importers in wordpress ?

 

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

 

7. What is difference between worpress.org and wordpress.com ?


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

 

8. Is WordPress safe from brute force login attempts? If not, how can you prevent such an attack vector?


  
No, WordPress on its own is vulnerable to brute force login attempts.

Some good examples of actions performed to protect a WordPress installation against brute force are:

·         Do not use the “admin” username, and use strong passwords.

·         Password protect “wp-login.php”.

·         Set up some server-side protections (IP-based restrictions, firewall, Apache/Nginx modules, etc.)

·         Install a plugin to add a captcha, or limit login attempts.

   
9. What is Activity Widget in WordPress Dashboard?

   
The Activity widget includes latest comments on your blog, recent posts and recently published posts. It allows you to unapprove or approve the comment, reply to the comment, editing the comment or you can delete the comment or move it to spam.

10. What are different types of user roles in wordpress users ?


      wordpress having different types of roles.
      i) Subscriber
      ii) Contributer
     iii) Author
     iv) Editor
     v) Administrator

11. What are the action hook functions ?
       has_action()
       add_action()
       do_action()
       do_action_ref_array()
       did_action()
       remove_action()
       remove_all_actions()
       doing_action()
 

12 What are the filter hook functions ?
       
        has_filter()
        add_filter()
        apply_filters()
        apply_filters_ref_array()
        current_filter()
        remove_filter()
        remove_all_filters()
        doing_filter()


13.  What are the functions for activation, deactivation, register ?

       register_activation_hook()
       register_deactivation_hook()
       register_uninstall_hook()






No comments:

Post a Comment