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.
Below are few major features of Wordpress
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
Q3. Enlist few advantages of using WordPress?
Below are the few advantages of using Wordpress.
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.
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.
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.
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
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
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:
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.
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:
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.
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:
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 :
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
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.
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.
__( 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:
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:
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:
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.
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