WordPress Questions For Interview 2020
This WordPress Questions for Interview with answers 2020 is a great help for those students and professionals who are preparing for Job Interview or Exam
WordPress Interview Questions For 2020
- WordPress Questions For Interview: What is WordPress?
Answer: Word press is a best Open Source CMS which allows it to be used free of cost. You can use it on any personal or commercial website without having to pay a single penny for it. It is built on PHP/MySQL (which is again Open Source) and licensed under GPL.
- WordPress Questions For Interview: How safe is a website on WordPress?
Answer: The word press is safe to operate, but still, it is suggested to keep updating with the latest version of WordPress to avoid hacking.
- WordPress Questions For Interview: Are there any limitations to a WordPress website?
Answer: You can use WordPress for e-commerce sites, membership sites, photo galleries and any other type of site you can think of. The website is created using the same HTML code as any other site, so there are no limitations there either.
- WordPress Questions For Interview: Do you need to have a blog in order to use WordPress for a site?
Answer: WordPress was originally used as blogging software though it has since become popular for the website also. It is not necessary to have a blog to use WordPress. Still having a blog is commendable as it will help in search engine optimization.
- WordPress Questions For Interview: From SEO point of view is WordPress helpful? Will it show the website on Google?
Answer: It is one of the benefits of using WordPress; it has inbuilt SEO search engine. Also, you can have an additional plug-in in WordPress to help with SEO and rank on a popular search engine like Google.
- WordPress Questions For Interview: What is the current version of WordPress?
Answer: You need to quote the current version of WordPress available in the market along with the release date.
- WordPress Questions For Interview: What are the types of hooks in WordPress and mention their functions?
Answer: There are two types of hooks 1) Action hooks 2) Filter hooks
Hooks allow a 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 content or text at the end of the post. - WordPress Questions For Interview: What do you mean by a custom field in WordPress?
Answer: The custom field is a meta-data that allows you to store arbitrary information in the WordPress post. Through custom field, extra information can be added to the post.
- WordPress Questions For Interview: What are the positive aspects of WordPress?
Answer: Few positive aspects of WordPress are
Easy installation and upgrade
In-built SEO engine
Easy theme system
Flexibility
Multilingual- available in more than 70 languages
Own data- no unwanted advert on your website
Flexibility and Easy publishing option - WordPress Questions For Interview: What are the rules that you have to follow for WordPress plugin development?
Answer: 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 the 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 - WordPress Questions For Interview: What is the prefix of WordPress tables by default?
Answer: By default, wp_ is the prefix for WordPress.
- WordPress Questions For Interview: Why does WordPress use MySQL?
Answer: MySQL is widely available database server and is extremely fast. It is an open source, and it is available at no cost also it is supported by many low-cost Linux hosts so its easy for anyone to host their website.
- WordPress Questions For Interview: Is it possible to rename the WordPress folder?
Answer: Yes, it is possible to rename the WordPress folder. If WordPress is already installed, you have to log in to the weblog as the administrator and then change the settings
WordPress address (URI) :
Blog address( URI) :
After making the changes, you can rename the folder or directory with the WordPress file in it. - WordPress Questions For Interview: How many tables are there in WordPress by default?
Answer: There are about 11 tables in WordPress by default. Note: With succeeding releases of WordPress this number will change. You need to check phpMyAdmin to determine the number of tables in a vanilla version of latest WordPress installation.
- WordPress Questions For Interview: What is WordPress loop?
Answer: To display post WordPress use PHP code, this code is known as a loop.
- WordPress Questions For Interview: How can you disable the WordPress comment?
Answer: If you go to the dashboard under options “discussion, there is a comment “ Allow people to post comment” try unchecking the comment.
- WordPress Questions For Interview: What are the steps you can take if your WordPress file is hacked?
Answer: 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 - WordPress Questions For Interview: What are the template tags in WordPress?
Answer: List some features of WordPress?
The features of WordPress are −
In WordPress template tags is a code that instructs WordPress to “do” or “get” something. - WordPress Questions For Interview: Does WordPress have cookies?
Answer: Yes, WordPress has cookies, and WordPress uses cookies for verification of users while logged in.
- WordPress Questions For Interview: In which cases you don’t see plugin menu?
Answer: You can’t see your plugin menu when the blog is hosted on free wordpress.com as you cannot add plugin there. Also, if you do not have an account of an administrator level on your WordPress is not possible to see the plugin.
- WordPress Questions For Interview: At what instance you get locked out of your WordPress admin and look at your website as a blank screen?
Answer: This would likely happen when you have pasted the code from a website with wrong formats, also when you have pasted the code in an incorrect location. It may also happen when your IP is banned
- WordPress Questions For Interview: Why you use a static front page in WordPress?
Answer: Some WordPress users want their WordPress installation to be more than a blog site. To give their page a look more like a real website page some users use static front page.
- WordPress Questions For Interview: What are the plugins you can use to create a contact form in WordPress?
Answer: To create a contact form in WordPress, you can use a plugin like Gravity forms or also you can use a free plugin contact form 7.
- WordPress Questions For Interview: Why does widget not show up in the sidebar?
Answer: While using a widget, you have to ensure whether your theme supports the widget and if it does then, it must show the sidebar. If in any case if it happens that you don’t see the sidebar, then it might be missing the “function.php” file or file similar to that. This can also happen if you have forgotten to save the changes in the widget or to refresh the older display of the page.
- WordPress Questions For Interview: Is there any limitation for using WordPress?
Answer: No, there is no limitation for using WordPress. WordPress can be used for innumerable purpose membership site, e-commerce site, photo-gallery and many more.
- WordPress Questions For Interview: How is creating a site on wordpress.org different from wordpress.com?
Answer: Most of the things are similar in both except the choices of themes and the use of plugins.
- WordPress Questions For Interview: Why is wordpress.com considered more secure than wordpress.org?
Answer: WordPress.com is considered more secure than wordpress.org because they limit the themes and also does not allow installing plugins. However, the security is more dependable on how the hosting company is hosting your website(wordpress.org) & also what are the steps they are taking to prevent the security problems.
- WordPress Questions For Interview: Do de-activated plugins slow down a WordPress site?
Answer: No, de-activated plugins cannot slow down the WordPress site. WordPress only loads the active plugins and ignores everything else.
- WordPress Questions For Interview: In what case we cannot recommend WordPress to our client?
Answer: We cannot recommend WordPress in the following situation:
If the client is working on a non-CMS base project
If a site wants complex or innovative e-commerce
In case of enterprise intranet solution
Sites are requiring custom scripting solutions. - WordPress Questions For Interview: What are the essential features you look for a theme?
Answer: Theme selection differs according to the requirement, but an ideal theme would be something that would not restrict to use the number of pages, plugins or static homepage.
- WordPress Questions For Interview: What is a Child Theme?
Answer: The child theme is an extension of the parent theme. If you make changes to the main/parent theme, any update will undo the changes. With a child theme, the customizations are preserved on an update.
- WordPress Questions For Interview: How can you create a static page with WordPress?
Answer: To create a static page in WordPress, in the page section you have to upload a PHP file to the server in the theme folder, and then select that as your template. It allows you to add any page and look that you wanted for your blog and it will remain static.
- WordPress Questions For Interview: Is there any other CMS better WordPress?
Answer: WordPress is no doubt a good CMS, but Drupal and Joomla are among the best CMS you can work with.
- WordPress Questions For Interview: Which is the best multilingual plugin for WordPress?
Answer: Keeping all the limitations in mind, WPML would be the best multilingual plugin for WordPress.
- WordPress Questions For Interview: Can you update your own content on the site?
Answer: It depends on the type of the site or project, but yes one can update their own content on the site.
- WordPress Questions For Interview: What are meta-tags?
Answer: Meta-tags are keywords and description used to display website or page information.
- WordPress Questions For Interview: What should one use for plugin development — custom post types or custom database tables?
Answer: There is no specific preference for plugin development; it depends on what type of plugin’s one has to develop. Though few recommend custom post type, as it has few benefits compared to a custom database table.
- WordPress Questions For Interview: Can you host WordPress using Amazon web services such as EC2, RDS, EBS, etc.?
Answer: Yes, you can host using Amazon web services.
- WordPress Questions For Interview: Is there any way to write series in WordPress?
Answer: You can use organize series plugin to write series in WordPress.
- WordPress Questions For Interview: What are the reasons why one should not hack WordPress core file?
Answer: The best reason not to hack the core files is that whatever you might be doing has to be reworked as a patch.
User Management
Media Management
Theme System
Extend with Plugins
Search Engine Optimized
Multilingual
Importers - WordPress Questions For Interview: What are disadvantages of WordPress?
Answer: The disadvantages of WordPress are −
Using several plugins can make website heavy to load and run.
PHP knowledge is required to do modification 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 of WordPress version leads to loss of data so it requires the backup copy of website.
Modifying and formatting the graphic images and tables is difficult. - WordPress Questions For Interview: What are the different types of gadgets present in the WordPress Dashboard?
Answer: The different types of gadgets present in the WordPress Dashboard are −
Dashboard Menu
Screen Options
Welcome
Quick Draft
WordPress News
Activity
At a Glance - WordPress Questions For Interview: What is the use of Quick Draft section in WordPress Dashboard?
Answer: The Quick Draft is a mini post editor allows writing, saving and publishing post from admin dashboard. It includes the title for the draft, some notes about your draft and save it as a Draft.
- WordPress Questions For Interview: What is the use of WordPress News in WordPress Dashboard?
Answer: The WordPress News widget displays the latest news such as latest software version, updates, alerts, news regarding the software etc from the official WordPress blog.
- WordPress Questions For Interview: What is At a glance in WordPress Dashboard?
Answer: This section gives overview of your blog’s posts, number of published posts and pages, number of comments. When you click on these links, you will be taken to the respective screen. It displays the current version of running WordPress along with currently running theme on the site.
- WordPress Questions For Interview: What is Activity Widget in WordPress Dashboard?
Answer: 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.
- WordPress Questions For Interview: What is the What is WordPress Writing Setting?use of WordPress General Setting?
Answer: WordPress general setting is used to set the basic configuration settings for your site.
- WordPress Questions For Interview: What is the use of Post via e-mail option in WordPress Writing Setting?
Answer: This option uses email address to create post for you and publishes posts on your blog by email. To use this, you’ll need to set up a secret e-mail account with a POP3 access, and any mail received at this address will be posted.
- WordPress Questions For Interview: What is WordPress Reading Setting?
Answer: Reading Setting is used to set the content related to the front page. Here you can set the number of post to be displayed on the main page.
- WordPress Questions For Interview: What is the use of Syndication feeds show the most recent field in WordPress Reading Settings?
Answer: The user can view the number of posts when they download one of the site feeds. By default, it is set as 10.
- WordPress Questions For Interview: What is the use of Search Engine Visibility field in WordPress Reading settings?
Answer: It Discourage search engines from indexing this site, your site will be ignored by the search engine.
- WordPress Questions For Interview: What is WordPress Discussion setting?
Answer: WordPress discussion setting can be defined as the interaction between the blogger and your visitors. These settings are done by the admin to have a control over the posts/pages that come in through users.
- WordPress Questions For Interview: What is the use of Media setting?
Answer: It is used to set the height and widths for the images which you’re going to use into your website.
- WordPress Questions For Interview: What is Permalink setting?
Answer: Permalink is a permanent link to a particular blog post or category. It allows setting the default permalink structure. These settings are used to add permalinks to your posts in WordPress.
- WordPress Questions For Interview: What is Plugin setting?
Answer: Plugin allows easily modifying, customizing or enhancing wordPress blog or post. The wordPress Plugin is software that can be uploaded to expand the functionality of the site. They add services or features to wordPress blog.
- WordPress Questions For Interview: What is wordPress Category?
Answer: Category is used to indicate sections of your site and group related posts. It sorts the group content into different sections. It is a very convenient way to organize the posts.
- WordPress Questions For Interview: What is wordPress Post?
Answer: Posts are also known as articles and sometimes referred as blogs or blog posts. These are used to popularize your blogs.
- WordPress Questions For Interview: What is Preview Post in wordPress?
Answer: Preview Post is to view the post before it is published to the user. It’s safer to preview your post and verify how your post looks on website.
- WordPress Questions For Interview: What is Publish Post in wordPress?
Answer: Publish is used to make the post available to all the users wherein every user can view that particular post.
- WordPress Questions For Interview: What is Media Library?
Answer: Media Library consists of the images, audios, videos and files that you can upload and add to the content when writing a Post or Page.
- WordPress Questions For Interview: What is Grid View in Media Library?
Answer: It displays all images in the grid format.
- WordPress Questions For Interview: How media files can be inserted into the WordPress site?
Answer: Media files can be inserted to your Pages or Posts from libraries, from local storage or from URLs.
- WordPress Questions For Interview: WordPress Questions For Interview: What are pages in wordPress?
Answer: Pages are static content and often do not change its displayed information.
- WordPress Questions For Interview: WordPress Questions For Interview: What is WYSIWYG Editor?
Answer: WYSIWYG Editor is similar to a word processor interface where we can edit the contents of the article.
- WordPress Questions For Interview: WordPress Questions For Interview: What is Page attribute module?
Answer: Page attributes module allows you to select parents for your particular page. You can also set order of the pages.
- WordPress Questions For Interview: WordPress Questions For Interview: What is Tag in wordPress?
Answer: Tag is small information attached to main content or post for the purpose of identification. It tells the visitors what actually the post is about. If the tag is mentioned properly then it helps to find the content very easily.
- WordPress Questions For Interview: What is the use of Slug field in tags?
Answer: It is used to specify the tags URL.
- WordPress Questions For Interview: What are link in WordPress?
Answer: Link is a connection from one resource to another. Adding links to your pages or blog posts helps you to connect to other pages.
- WordPress Questions For Interview: What is the use of adding comments?
Answer: Adding comments allows your visitors to have a discussion with you. Comments are approved by the admin and then posted to be discussed further.
- WordPress Questions For Interview: What is a Moderate comment?
Answer: Comment moderation is a process where, when visitors comment on posts, the comment is not published directly until and unless it is approved by the admin to be posted. It manages your comments so that there is no comment spamming.
- WordPress Questions For Interview: What is the role of Contributor in WordPress?
Answer: Contributor can only write and edit their posts until published. They can create their own posts and pages but cannot publish them. They cannot upload images or files but can see your site’s status. When they want to publish any post, it must be first notified personally to the administrator by the contributor to review. When the post is approved the contributor cannot make any changes once publishe
- WordPress Questions For Interview: What is Theme Management in WordPress?
Answer: Themes make your websites display with modification. It includes image files, templates, css stylesheets etc that can help you to make your website look great.
- WordPress Questions For Interview: What is Customize theme?
Answer: Customizing themes helps you to give a new look to your website. Here you can change background images/colors, add titles, and do much more.
- WordPress Questions For Interview: What is Widget Management?
Answer: Widgets are small blocks that perform specific functions. These give design and structure control to the WordPress theme.
They help you add content and features.
They can be easily dragged and dropped in widget area.
Widgets vary theme to theme. They are not same for every theme. - WordPress Questions For Interview: Mention the steps to optimize your WordPress?
Answer: The steps to optimize the WordPress are −
High quality and meaningful content.
Have right names for images.
Use short permalinks that include keywords.
Optimized themes.
Sitemap in XML format.
Connect posts to social networks.
Beware of black hat techniques.
Delete your trash box.
Keep Checking Your Site Statistics
Keep checking your plugins.
Using Css and JavaScript effectively. - WordPress Questions For Interview: What is the role of Editor in WordPress?
Answer: The Editor has access to all the posts, pages, comments, categories, tags, and links. They can create, publish, edit or delete any posts or pages.
- WordPress Questions For Interview: What is the role of Follower in WordPress?
Answer: Follower can only read and comment on the posts. Followers are the ones who have signed in to your account to receive updates.
- WordPress Questions For Interview: What is the role of Viewer in WordPress?
Answer: Viewers can only view your posts; they cannot edit but can only comment on the posts.
- WordPress Questions For Interview: What is Media Management?
Answer: It is the tool for managing the media files and folder, in which you can easily upload, organize and manage your media files on your website.
- WordPress Questions For Interview: What is Multilingual?
Answer: It allows translating all the content into the user choice languages.
- WordPress Questions For Interview: What is User Management?
Answer: It allows managing the user information such as changing the role of the users to (subscriber, contributor, author, editor or administrator), create or delete the user, change the password and user information. The main part of the user manager is Authentication.
- WordPress Questions For Interview: Which is the PHP compatibility used for WordPress?
Answer: PHP 5.2+
- WordPress Questions For Interview: What is WordPress Dashboard?
Answer: The WordPress Dashboard is a first screen which will be seen when you log into the administration area of your blog which will display overview of the website. It is a collection of gadgets that provide information and give a glance overview of what’s happening with your blog. You can customize your needs by using some quick links such as writing quick draft, replying to latest comment etc.
- WordPress Questions For Interview: What is the use of Avatar field in WordPress Discussion Setting?
Answer: Avatar is a small image that displays at the top-right-hand corner of the dashboard screen beside your name. It is like your profile picture.
- WordPress Questions For Interview: What is the use of WordPress Address field in General setting?
Answer: It is the URL of WordPress directory where your all core application files are present.
- WordPress Questions For Interview: What is the use of Mail Server in WordPress Writing setting?
Answer: It allows reading the emails that you send to WordPress and stores them for retrieval. For this you need to have POP3 compatible mail server and it will have URI address such as mail.example.com, which you should enter here.
- WordPress Questions For Interview: What are Importers?
Answer: It allows importing data in the form of posts. It imports custom files, comments, post pages and tags.
- WordPress Questions For Interview: What is by default prefix of WordPress tables?
Answer: The wp_ is by default prefix of WordPress tables.
- WordPress Questions For Interview: In WordPress, objects are passed by value or by reference?
Answer: In WordPress, all objects are passed by value.
- WordPress Questions For Interview: How can you call a constructor for a parent class?
Answer: You can call a constructor for a parent class by this way:
Parents:: constructor($value) - WordPress Questions For Interview: In which cases, WordPress is not suitable for a website?
Answer: These are some situations when WordPress is not recommended:
If the client is working on the non-CMS based project.
For sophisticated and innovative e-commerce sites.
Sites which require custom scripting solutions. - WordPress Questions For Interview: Is WordPress the best CMS or any other CMS is better than WordPress?
Answer: No doubt WordPress is good CMS, but Drupal and Joomla are considered better CMS than WordPress to work.
- WordPress Questions For Interview: Which is considered more secured wordpress.com or wordpress.org?
Answer: WordPress.com is relatively more secure than wordpress.org because they limit the themes and does not allow plugin’s installation. However, security depends on the hosting company of your website and also what steps they are taking to prevent the security problems.
- WordPress Questions For Interview: Explain posts in WordPress?
Answer: 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.
- WordPress Questions For Interview: Explain pages in WordPress?
Answer: 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.
- WordPress Questions For Interview: What is the difference between WordPress posts and pages?
Answer: WordPress posts are content published on a site with an exact date and time. They can be categorized systematically by category and tags. They are listed in reverse chronological order on a website.
WordPress pages are static and do not frequently change such as contact us, about us, privacy policy. They don?t have a date and time published. However, the database stores their published date and time. - WordPress Questions For Interview: What is a loop in WordPress?
Answer: WordPress uses PHP codes to display posts. This PHP code is known as a loop.
- WordPress Questions For Interview: How can you disable WordPress comment?
Answer: 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.
- WordPress Questions For Interview: How can you edit a WordPress comment?
Answer: You can edit WordPress comment using the dashboard. From the panel, under the Comments option, select edit to edit a comment.
- WordPress Questions For Interview: Explain moderate comment in WordPress?
Answer: 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.”
- WordPress Questions For Interview: How to allow only registered users to comment on WordPress?
Answer: 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.
- WordPress Questions For Interview: Explain Avatar and Gravatar in WordPress?
Answer: 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.
- WordPress Questions For Interview: How can you handle the situation if your WordPress site is hacked?
Answer: You should follow these steps:
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 - WordPress Questions For Interview: Explain Categories in WordPress?
Answer: 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.
- WordPress Questions For Interview: How to convert a category into the tag?
Answer: 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.
- WordPress Questions For Interview: Explain Tags in WordPress?
Answer: With the help of tags, similar posts can be grouped. Hence, it makes more comfortable for the users to search for a particular post. Tags are similar to categories but still different.
- WordPress Questions For Interview: Explain the difference between WordPress Categories and Tags?
Answer: 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. - WordPress Questions For Interview: How many types of users WordPress have?
Answer: WordPress user role determines access permission to the users of a WordPress site.
Administrator: They have full rights over a site.
Editor: They deal with the content section of a website.
Author: They only deal with their posts. They can delete their post even after publishing.
Contributor: A contributor doesn’t have the right to publish their post or page. They need to send it to the administrator for review.
Subscriber: Users who are subscribed to your site can log in and update their profile.
Follower: They don’t have any right. They can only read and comment on your post.
Viewer: They can only read and comment on a post. - WordPress Questions For Interview: What are WordPress Themes?
Answer: With the help of a WordPress theme, you can design the layout and appearance of your website in the front-end.
- WordPress Questions For Interview: How will you select a WordPress theme?
Answer: WordPress theme should complement your site. It can be either free or paid. An ideal theme should have qualities like simple, responsive, supports plugins, SEO friendly.
- WordPress Questions For Interview: What is the difference between custom themes and normal themes?
Answer: Custom themes are very straightforward to format. You don’t need much technical knowledge to change in the coding part. The custom theme allows for SEO search, but with an SEO plugin available it would not make much difference to a normal theme.
- WordPress Questions For Interview: What is the difference between free and paid WordPress theme?
Answer: Free and premium WordPress themes are different in many ways. With free themes, you have to compromise with the quality as many other sites using the same theme. Problems in premium themes solved more quickly than in free themes.
- WordPress Questions For Interview: What are WordPress Plugins?
Answer: WordPress plugins are programs written in PHP scripting language that extends the functionality or add some new features to a WordPress site. They provide additional functions to an application.
- WordPress Questions For Interview: When will you not be able to see the plugin menu on a WordPress site?
Answer: When a site is hosted on free wrodpress.com, plugin menu will not appear. Also if you don’t have an account for the administrator level, you can’t see the plugin menu.
- WordPress Questions For Interview: When a site is hosted on free wrodpress.com, plugin menu will not appear. Also if you don’t have an account for the administrator level, you can’t see the plugin menu.
Answer: You can use a plug-in like Gravity forms or a free plugin contact form 7 to create a contact form in WordPress.
- WordPress Questions For Interview: Explain the difference between WordPress Themes and Plugins?
Answer: A theme is an external effect of a website’s presentation and designing. Whereas, a plugin is an interior effect which adds or remove some functions to a site.
You can customize some functionality in themes instead of installing the plugin, but plugins can’t replace themes. - WordPress Questions For Interview: How to update a WordPress site?
Answer: You should always update your site to the latest version of WordPress. Whenever there is a new WordPress version, you receive an update message on your admin screen.
There are two methods to update a WordPress site:
One-click update
Manually update - WordPress Questions For Interview: How to improve security on a WordPress site?
Answer: Security in a WordPress site is essential as these websites are favorite targets for hackers. A site can’t be perfectly secured, but one can at least reduce the risk by applying different security measures.
Some of the measures to secure a WordPress site are given below:
Choosing a host
Strong password
2 step login authentication
Limit number of login attempts
Use SSL
Keep site updated - WordPress Questions For Interview: How to reset password in WordPress?
Answer: If you forget or lost the password of your account, WordPress gives you an option to reset it through different methods.
There are four ways to reset WordPress password:
Change password from the dashboard
Reset password via email
Manually reset the password through database via PhpMyAdmin
Using emergency password reset script - WordPress Questions For Interview: How to optimize WordPress site performance?
Answer: Optimization increases the speed of your site and gives the best possible outcome. It improves the ranking of a website.
There are many tricks to optimize a WordPress site. Some of them are given below:
Use CDN
Use a caching plugin
Use a simple theme/framework
Keep site updated
Split long posts into smaller pages - WordPress Questions For Interview: What are template tags in WordPress?
Answer: Template tags are used within themes to retrieve content from your database. It is a piece of code that tells WordPress to get something from the database.
- WordPress Questions For Interview: What are meta-tags in WordPress?
Answer: Meta-tags are keyword and description used to display website or page information.
- WordPress Questions For Interview: What are custom fields in WordPress?
Answer: Custom fields are also called post meta. It is a feature through which users can add arbitrary information when writing a post. These metadata can be displayed using template tags in WordPress themes.
- WordPress Questions For Interview: How to take the backup of a WordPress site?
Answer: A backup is just the copy of your original site through which you can restore your original site if anything goes wrong. Keeping a backup on the safe side is always advisable.
A site is generally made up of two parts. One is all the installed themes/plugins, media and other is Database which stores all your blogs, posts, and comments. Without files, there is no site, and without the database, there is no data. Hence both of them is important and need a backup. - WordPress Questions For Interview: Why is Backup important?
Answer: Backup allows you to retrieve your site back if something goes wrong or if your site breaks. There could be many reasons for this like external attack, hacking, server down.
You can lose everything from data to all the posts on your site. The backup is essential to avoid it.
Securing your backup is also an important issue. Make sure to update your plugins and themes regularly or in a specified interval. Use strong Username and Password. Database name should also be uncommon. - WordPress Questions For Interview: How to Backup WordPress root Files?
Answer: There are many files in your WordPress directory. These files can be downloaded back from wordpress.org site. Some of them can be retrieved back but some can’t.
The wp-content directory contains all your installed themes and plugins including all your media files like images, audio or video files which you uploaded on your site. Hence, it makes it personal and unique.
The wp-config.php file consists of your Database and other personnel options which make it also a unique file.
Both the above files can’t be replaced by other default files. Hence, they need to be backed up. - WordPress Questions For Interview: Explain the steps involved in the backup of the database?
Answer: In the database, all your posts, media files, comments, and metadata stored. It also contains user’s information and all your plugin settings. All these information are personal and unique. If you lose them, they are gone permanently. Select your WordPress database (which you created during the installation of WordPress).
Click on Export.
Quick is used when the database is small. Custom is used when the database is large. Suppose we are choosing Custom.
After choosing Custom, a table appears. Select all the tables.
Now come to the Output section.
Choose SQL from the Format drop-down menu.
Check “Add drop table.” It is useful for overwriting an existing table.
Check “If not exists.” It prevents errors when tables are already there.
Now click Go. Your data will be saved in your system. - WordPress Questions For Interview: Which licensing authority is responsible for WordPress?
Answer: WordPress is licensed under GPLv2 (GNU General Public License) which makes it free and open-source software. Each copy of WordPress has a licensed copy with it.
- WordPress Questions For Interview: What is GNU?
Answer: The GNU General Public License is called GPL in short. It has some terms and conditions to copy, modify and distribute the software licensed under its name.
GNU makes sure that any software source-code licensed under it has to make originating source code open and freely available to all its users. Here, freely doesn’t mean by cost but it says that it is freely available to users to distribute and modify the code, but they can’t impose any restrictions on further distribution, the source code has to be made available. - WordPress Questions For Interview: What year was WordPress released?
Answer: First version of wordress is released in Year 2003
- WordPress Questions For Interview: What are minimum requirements to run WordPress?
Answer: PHP 7 or greater
MySQL 5.6 or greater OR MariaDB 10.0 or greater
The mod_rewrite Apache module
HTTPS support(Recommended)
What is a plugin in WordPress? List plugin that comes with 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 - WordPress Questions For Interview: What is the difference between wordpress.com and wordpress.org?
Answer: 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.
- WordPress Questions For Interview: Where is WordPress content stored?
Answer: WordPress contents are stored in MySQL database on Server.
- WordPress Questions For Interview: What are the differences between Posts and Pages?
Answer: Posts and Pages are the two content types in WP.
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 are static content, so an about us, contact us page etc. They are permanent and timeless entries. - WordPress Questions For Interview: What are the types of hooks in WP and what are their functions?
Answer: There are two types hooks are available in WordPress, action hooks and filter hooks
They allow the user to, with short snippets of code, modify areas in a theme or plugin without modifying the original file. - WordPress Questions For Interview: What is an action hook?
Answer: An Action hook in WordPress is a hook that is triggered at a specific time when WordPress is running and lets you take an action. This can include things like creating a widget when WordPress is initializing or sending a Tweet when someone publishes a post.
- WordPress Questions For Interview: What is a filter hook?
Answer: A Filter hook in WordPress allows you get and modify WordPress data before it is sent to the database or the browser. Some examples of filters would include customizing how excerpts are displayed or adding some custom code to the end of a blog post or headings.
- WordPress Questions For Interview: How do you enable debug mode in WP?
Answer: You can enable debug mode in WP by editing wp-config.php file and changing WP_DEBUG constant value to true
- WordPress Questions For Interview: What is a WordPress taxonomy?
Answer: In WordPress, a “taxonomy” is a grouping mechanism for some posts (or links or custom post types). There are four default taxonomies in WordPress they are
Category
Tag
Link Category
Post Formats
You are also free to create your custom taxonomies too.
Also, Read PHP Interview Questions - WordPress Questions For Interview: Is WordPress secure?
Answer: Yes. A WP website is completely secure. The error can come from downloading plugins and tools from an unauthorized source.
- WordPress Questions For Interview: How many default tables are the WordPress, Can you list them?
Answer:
There are 11 table 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 - WordPress Questions For Interview: What is default table prefix for wordpress?
Answer: wp_ is default prefix for WordPress.
- WordPress Questions For Interview: What are disadvantages of WordPress?
Answer: Use of multiple plugins can make website heavy to load and slow
Only utilizes PHP
Sometimes updates can lead to loss of data, so you always need a backup copy
Modifying images and tables are difficult. - WordPress Questions For Interview: What is the difference between installing and activating a theme?
Answer: When a theme is activated it’s what’s controlling your site, while an installed theme is simply part of your theme library and available to activate.
- WordPress Questions For Interview: Which ‘meta box’ is not hidden by default on Post and Page screens?
Featured Image is the meta box that is not hidden by default on Post and Page screens.
- WordPress Questions For Interview: What is the difference between the two URLs in General Settings? (Hint: WordPress Address AND Site Address)?
Answer: The WordPress Address is where to look for WordPress files, while the Site Address is what will be used as the base for creating URLs for web pages.
- WordPress Questions For Interview: What are Importers in WordPress?
Answer: In 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.
- WordPress Questions For Interview: What do you mean by the custom field in WordPress?
Answer: Custom fields are also known as post meta. Post meta is a feature in WordPress which allows post authors to add additional information at the time writing a post. WordPress stores this information as metadata in key-value pairs. Users can later display this metadata by using template tags in their WordPress themes if required.
- WordPress Questions For Interview: In WordPress, objects are passed by value or by reference?
Answer: In WordPress, all objects are passed by value.
- WordPress Questions For Interview: What is the loop in WordPress?
Answer: The Loop is PHP code used by WordPress to display posts.
- WordPress Questions For Interview: How can you disable comments in WordPress?
Answer: To disable comments in WordPress, Please follow below steps
Step 1: Login to your WordPress admin panel.
Step 2: Go to the Settings menu.
Step 3: Under Settings menu click on Discussion.
Step 4: Uncheck Allow people to post comments on new articles. checkbox
Step 5: Click on save changes button, you done - WordPress Questions For Interview: List some action and filter hooks functions in WordPress?
Answer: Below are list of some Filter hooks functions
has_filter()
add_filter()
apply_filters()
apply_filters_ref_array()
current_filter()
remove_filter()
remove_all_filters()
doing_filter()
Below are list of some Action hooks functions
has_action()
add_action()
do_action()
do_action_ref_array()
did_action()
remove_action()
remove_all_actions()
doing_action() - WordPress Questions For Interview: What are the template tags in WordPress? List some of them?
Answer: In WordPress template tags are PHP functions that are used to display information dynamically or customize blog template.Below are 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()
Read More about WordPress template tags from https://codex.wordpress.org/Template_Tags - WordPress Questions For Interview: Function to get website url in wordpress?
Answer: get_site_url(); function is used to get website url in wordpress.
- WordPress Questions For Interview: How will you display error messages during development in WordPress?
Answer: To display error messages in WordPress. Open WordPress wp-cofig.php file and change WP_DEBUG constant value to true
In WordPress, WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the “debug” mode throughout the website. - WordPress Questions For Interview: List the Positive aspects of WordPress?
Answer: Following are the Positive aspects of WordPress:
In-built SEO system
Flexibility
Community
Easy theme system
Easy installation and upgrade
Easy and flexible publishing option
Multilingual is available in about more than 70 languages
Own data full control and no unwanted advert on your personal or commercial website. - WordPress Questions For Interview: What is a custom field in WordPress?
Answer: 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.
- WordPress Questions For Interview: Mention the rules to be followed while developing the WordPress Plugin?
Answer: While developing a WordPress Plugin, the following rules should be followed step by step:
Create a unique name.
Create the folder of Plugin.
Create a sub-folder for PHP files, translations, and assets.
Create the main plug-in file and fill up the header information.
Create activation and de-activation functions.
Create an uninstall script.
Create a readme.txt file.
In case of detecting the paths to plug-in file, use proper functions and constants. - WordPress Questions For Interview: Why is MySQL used in WordPress?
Answer: The following features of MySQL satisfy the use of MySQL in WordPress and make it easy for anyone to host their website.
The widely available database server
Extremely fast
Open source
Free of cost
Supported by many low-cost Linux hosts. - WordPress Questions For Interview: Does WordPress use cookies?
Answer: Yes, WordPress has cookies and uses them for verification purpose of the users while they log in.
- WordPress Questions For Interview: Is wordpress.com more secure than wordpress.org?
Answer: Yes, wordPress.com is considered to be more secure than WordPress.org because it limits the themes and does not allow the installation of plugins. But, the security is, however, more dependable on how your website is hosted by the hosting company and also the steps they take to prevent the security problems.
- WordPress Questions For Interview: Why is a static front page used in WordPress and how can you create one?
Answer: Some users want their WordPress installation to be more than a blog. In order to give their page a look like a real website, the users tend to use a static front page. The static front page in a WordPress can be created in the page section, where the user has to upload a PHP file to the server in the theme folder.And, then later select that is selected as a template, and that ultimately allows you to add any page and look that you wanted for your blog and will remain static.
- WordPress Questions For Interview: Which is the considerably best multilingual plugin in WordPress?
Answer: WPML is the best multilingual plugin for WordPress.
- WordPress Questions For Interview: List the essential features you look for a theme?
Answer: The theme selection varies according to the requirements of the user. But an ideal theme would be something that does not restrict the use of number pages, static homepages or plug-ins.
- WordPress Questions For Interview: What is a child theme?
Answer: The extension of a parent theme is a child theme. In case you make changes to the parent theme, then any update will undo the changes. When working on a child theme, the customizations are preserved on an update.
- WordPress Questions For Interview: Can you list any other CMS better than WordPress?
Answer: No doubt that WordPress is a good CMS, but there are some other best CMS as well that the user can work with too, like Drupal and Joomla.
- WordPress Questions For Interview: Are there any limitations in WordPress?
Answer: Of course, not, there are no limitations to use WordPress.It can be used for innumerable purposes like membership site, photo gallery, e-commerce site and any other site you can think of. The website is created with the same HTML codes as any other site, so there are no limitations on the website either.
- WordPress Questions For Interview: What do you do when your WordPress website is hacked?
Answer: Below are the basic steps that can be taken when your WordPress website 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 if all your themes and plug-ins are up-to-date
Uninstall all plugins that are downloaded from untrusted places - WordPress Questions For Interview: How safe is your website on WordPress?
Answer: WordPress is safe to operate, but it is suggested to keep yourself updated with the latest version of WordPress in order to avoid hacking.
- WordPress Questions For Interview: What is usermeta function in WordPress?
Answer: The user metafunction is used to retrieve the metadata of users. It can return a single value or an array of metadata.
Syntax is: get_user_meta( int $user_id, string $key = ”, bool $single = false )
User id is the required user id parameter
Key is the optional parameter which is the meta key to retrieve. By default, it returns data for all key values.
Single is an optional parameter that tells whether the single value will return. By default, it is false. - WordPress Questions For Interview: What Should One Use For Plugin Development-custom Post Types Or Custom Database Tables?
Answer: There is no specific preference for plugin development; it depends on what type of plugin’s one has to develop. Though few recommend custom post type, as it has few benefits comparison to custom database table.
- WordPress Questions For Interview: Can You Host WordPress Using Amazon Web Services Such As Ec2, Rds, Ebs Etc?
Answer: Yes, you can host using Amazon web services.
- WordPress Questions For Interview: Is There Any Way To Write Series In WordPress?
Answer: You can use organize series plugin to write series in wordpress.
- WordPress Questions For Interview: What Are The Reasons Why One Should Not Hack WordPress Core File?
Answer: The best reason not to hack the core files is that whatever you might be doing has to be reworked as a patch.
- WordPress Questions For Interview: Which Is The Best Multi-lingual Plugin For WordPress?
Answer: Keeping all the limitations in mind, WPML would be the best multi-lingual plugin for wordpress.
- WordPress Questions For Interview: Can You Update Your Own Content On The Site?
Answer: It depends on the type of the site or project, but yes one can update their own content on the site.
- WordPress Questions For Interview: Does De-activated Plugins Slow Down A WordPress Site?
Answer: No, de-activated plugins cannot slow down the WordPress site. WordPress only loads the active plugins and ignores everything else.
- WordPress Questions For Interview: In What Case We Cannot Recommend WordPress To Our Client?
Answer: We cannot recommend WordPress on following situation:
If client is working on non-CMS base project.
If site wants complex or innovative e-commerce.
In case of enterprise intranet solution.
Sites requiring custom scripting solutions. - WordPress Questions For Interview: At What Instance You Get Locked Out Of Your WordPress Admin And See Your Website As A Blank Screen?
Answer: This would likely happen when you have pasted a code from a website with wrong formats, also when you have pasted a code in a wrong location. It may also happen when your IP is banned.
- WordPress Questions For Interview: Why You Use A Static Front Page In WordPress?
Answer: Some WordPress users wants their WordPress installation to be more than a blog site. To give their page a look more like a real website page some users use static front page.
- WordPress Questions For Interview: How to Choose a Theme?
Answer: This is one of the more individual interview questions on WordPress and there is no single right answer. However, no matter the theme you choose, you should probably pick one without the restrictions in the number of pages, plugins, and a static homepage.
One such reliable and multipurpose WordPress theme is Uncode. This flexible pixel-perfect theme easily adapts to the user’s needs, whatever it may be – a portfolio, a business-oriented website, a creative website and many more. Uncode provides users with a myriad of tools to help design pages in no time. Some of the unique features, such as asymmetrical layouts and bold typography are what the Uncode is popular for. - WordPress Questions For Interview: Is It Possible to Host WordPress Using Amazon Web Services?
Answer: Yes, it is.
- WordPress Questions For Interview: When Should You Not Recommend WordPress to a Client?
Answer: You should not recommend WordPress to a client if they are working on a non-CMS base project; if they want complex or innovative e-commerce; in case of enterprise intranet solution; if the site requires custom scripting solutions.
- WordPress Questions For Interview: Is WordPress useful when it comes to SEO? Will it show the website on Google?
Answer: WordPress has a built in SEO search engine. Users also have the option to add additional plugins to help with SEO and ranking.
- WordPress Questions For Interview: How is a Custom theme different from a Normal theme?
Answer: A custom theme allows for SEO. A Normal theme requires an SEO plugin. One benefit of using a Custom theme is that it allows users to make changes without diving too deep into the coding part.
- WordPress Questions For Interview: Can you host WordPress while using Amazon web services such as EC2, RDS, EBS, etc?
Answer: Yes.
- WordPress Questions For Interview: Why is it best not to hack a WordPress core file?
Answer: Because whatever changes you might make will have to be reworked as a patch.
- WordPress Questions For Interview: How many table are there in WordPress by default?
Answer: You will need to check phpMyAdmin to determine the number of tables in a vanilla version of the latest WordPress installation.
- WordPress Questions For Interview: What are the two types of hooks in WordPress and what are their functions?
Answer: Action hooks: These allow you to insert additional code from an outside source.
Filter hooks: These allow you to add content or text at the end of a post. - WordPress Questions For Interview: Can you rename a WordPress folder?
Answer: You will need to check phpMyAdmin to determine the number of tables in a vanilla version of the latest WordPress installation.
Yes, if WordPress is already installed you must log in to the weblog as the administrator and changed the settings:
WordPress address (URI):
Blog address (URI):
Once the changes have been made, you can rename the folder or directory with the WordPress file in it. - WordPress Questions For Interview: How do you create a folder in WordPress if it doesn’t already exist?
Answer: $pathname = ‘path/to/directory’;
if (!file_exists($pathname)) {
mkdir($pathname, 0755, true);
}
*Please note that the permission configuration depends on what kind of directory you are creating. - WordPress Questions For Interview: What steps should you take if your WordPress site is hacked?
Answer: Check the server log.
Clean up the site (affected files, database).
Remove any vulnerabilities (mostly from installed plugins).
Install a strong security plugin.
Re-install the latest version of WordPress.
Change your password and user-id for all of your users.
Make sure your themes and plugins are up to date. - WordPress Questions For Interview: How do you modify the parent theme behavior within the child theme?
Answer: The child theme has the ability to override other template files such as author.php, category.php, style.cssetc. The WordPress framework search for a template file in the child theme directory and then will pick it up from the parent directory if not found.
- WordPress Questions For Interview: How do you create a static page with WordPress?
Answer: In the page section, upload your php files to the server in the theme folder and select them as your template. This will allow you to add any page or look that you want for your blog and it will remain static.
- WordPress Questions For Interview: How do you implement a multi-language site on WordPress?
Answer: WordPress does not have a bi/multi-language feature already built into its system. Plugins and themes offer multi-language features that are built-in.
- WordPress Questions For Interview: What are the requirements for developing a WordPress plugin?
Answer: a memorable name
the plugin’s folder
a subfolder for PHP files, translations and assets
the main plugin file and fill in header info
activation and deactivation functions
an uninstall script
use proper constants and functions to detect paths to the plugin file - WordPress Questions For Interview: What are the uses of _() and _e() functions in WordPress?
Answer: These functions are used when your website is multilingual.
1st parameter: String which you want to convert from one language to another.
2nd parameter: Domain name.
$translatedText = __(‘TEXT_FOR_TRANSLATION’, ‘textdomain’); //This will return the translated text
_e(‘TEXT_FOR_TRANSLATION’, ‘textdomain’); //This will print the translated text - WordPress Questions For Interview: How do you get the last inserted row id from WordPress’ database?
Answer: global test;
$lastId = test->insert_id; //This is last insert id - WordPress Questions For Interview: How do you remove P and Br tags in WordPress posts?
Answer: Open functions.php in your currently active theme and add the following lines.
remove_filter( ‘the_content’, ‘wpautop’ );
remove_filter( ‘the_excerpt’, ‘wpautop’ ); - WordPress Questions For Interview: What is the difference between site_url() and home_url()?
Answer: The site_url() is always the location where you can reach the site by tacking on /wp-admin on the end. On the other hand, home_url() will not be in this same location. The home_url() is where you set your homepage by setting General>Settings “Site Address (URL)” field.
- How do you retrieve an image attachment’s alt text?
Answer: The wp_get_attachment_image() function will return an HTML string with the following attributes:
‘Src’
‘Class’
‘Alt’
‘title’ - WordPress Questions For Interview: What is the latest WordPress version?
Answer: The latest release is 4.9.4 version.
- WordPress Questions For Interview: What types of hooks in wordpress is used?
Answer: 1)Following are Actions hooks:.
has_action()
add_action()
do_action()
do_action_ref_array()
did_action()
remove_action()
remove_all_actions()
2)Following are Filters hooks .
has_filter()
add_filter()
apply_filters()
apply_filters_ref_array()
current_filter()
remove_filter()
remove_all_filters() - WordPress Questions For Interview: How can you backup your WordPress Answer: content?
WordPress admin -> Tools -> Import
- WordPress Questions For Interview: How to run database Query in WordPress?
Answer: $wpdb->query(“select * from $wpdb->posts where ID>10 “);
- WordPress Questions For Interview: List most commonly functions used in wordpress?
Answer: wp_nav_menu() :- Displays a navigation menu.
is_page() :- to check if this is page OR NOT, will return boolean value.
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.
the_title():- Displays the title of the post in website.
the_content():- Displays the contents of the post in website. - WordPress Questions For Interview: Template Files List for development WordPress Theme?
Answer: Here is the list of the Theme files recognized by WordPress. Of course, your Theme can contain any other stylesheets, images, or files.
style.css: The main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.
rtl.css: The rtl stylesheet. This will be included automatically if the website’s text direction is right-to-left. This can be generated using the RTLer plugin.
index.php: The main template. If your Theme provides its own templates, index.php must be present.
comments.php: The comments template.
front-page.php: The front page template.
home.php: The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.
single.php: The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.
single-{post-type}.php
The single post template used when a single post from a custom post type is queried. For example, single-book.php would be used for displaying single posts from the custom post type named “book”. index.php is used if the query template for the custom post type is not present.
page.php: The page template. Used when an individual Page is queried.
category.php: The category template. Used when a category is queried.
tag.php: The tag template. Used when a tag is queried.
taxonomy.php: The term template. Used when a term in a custom taxonomy is queried.
author.php: The author template. Used when an author is queried.
date.php: The date/time template. Used when a date or time is queried. Year, month, day, hour, minute, second.
archive.php: The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types.
search.php: The search results template. Used when a search is performed.
attachment.php: Attachment template. Used when viewing a single attachment.
image.php: Image attachment template. Used when viewing a single image attachment. If not present, attachment.php will be used.
404.php: The 404 Not Found template. Used when WordPress cannot find a post or page that matches the query. - WordPress Questions For Interview: Essential plugins for WordPress?
Answer: Here i am going to share some useful plugins that really help you so much for managing and improving performance as well security of WordPress.
https://wordpress.org/plugins/wordpress-seo/ (Best SEO Plugin)
https://wordpress.org/plugins/google-sitemap-generator/ (sitemap)
https://wordpress.org/plugins/w3-total-cache/ (caching)
https://wordpress.org/plugins/wp-smushit/ (optimizing image files)
https://wordpress.org/plugins/wp-optimize/ (Simple but effective plugin allows you to extensively clean up your WordPress database and optimize it without doing manual queries: )
Security: - WordPress Questions For Interview: Prefix of WordPress tables by default?
Answer: prefix of WordPress tables by default?
By default, wp_ is the prefix - WordPress Questions For Interview: Plugin for Multi-language features?
Answer: WPML Multilingual Plugin.
URL: https://wpml.org/ - WordPress Questions For Interview: Alternative CMS of WordPress?
Answer: Joomla
Drupal
Ghost
Movable Type
Silver Stripe - WordPress Questions For Interview: What does the following function remove from a WordPress users admin area?
Answer: function remove_stuff ( $actions )
if( !is_super_admin() && !current_user_can( ‘edit_theme_options’ ) ) {
unset($actions[‘inline hide-if-no-js’]);
return $actions;
} else {
return $actions;
}
}
add_filter( ‘page_row_actions’, ‘remove_stuff’ );
add_filter( ‘post_row_actions’, ‘remove_stuff’ ); - WordPress Questions For Interview: What is the use of Slug field in tags?
Answer: It is used to specify the tags URL.
- WordPress Questions For Interview: What is WYSIWYG Editor?
Answer: WYSIWYG Editor is similar to a word processor interface where we can edit the contents of the article.
- WordPress Questions For Interview: Does WordPress have cookies?
Answer: Yes, WordPress have cookies and WordPress uses cookies for verification of users while logged in.
- WordPress Questions For Interview: Why “WP to Twitter” plugin fail to submit an update to Twitter in WordPress?
Answer: When creating your application, do not click the “create your access token” until you first click on Settings and change the Application Type to “Read, Write and Access direct messages”.
After your Twitter application has been updated to “Read, Write and Access direct messages”, click on the Home tab, and “create your access token”. - WordPress Questions For Interview: Tell me Would you initialize your strings with single quotes or double quotes?
Answer: Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
- WordPress Questions For Interview: Do you know Why doesnt the following code print the newline properly?
Answer: <?php
$str =’hello ,there.nHow are you?n Thanks for visiting Us’;
print $str;
?>
Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters – and n. - WordPress Questions For Interview: How to call a constructor for a parent class?
Answer: parent::constructor($value)
- WordPress Questions For Interview: Tell me Are objects passed by value or by reference?
Answer: Everything is passed by value.
- WordPress Questions For Interview: What is the difference between accessing a class method via -> and via ::?
Answer: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
- WordPress Questions For Interview: Suppose If the variable $a is equal to 5 and variable $b is equal to character a, whats the value of $$b?
Answer: 100, it’s a reference to existing variable.
- WordPress Questions For Interview: How to find out the number of parameters passed into function?
Answer: func_num_args() function returns the number of parameters passed in.
- WordPress Questions For Interview: Explain When are you supposed to use endif to end the conditional statement?
Answer: When the original if was followed by : and then the code block without braces.
- WordPress Questions For Interview: How to pass a variable by value in WordPress?
Answer: Just like in C++, put an ampersand in front of it, like $a = &$b
- WordPress Questions For Interview: Do you know Would I use print $a dollars or {$a} dollars to print out the amount of dollars in this example?
Answer: In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like “{$a},000,000 mln dollars”, then you definitely need to use the braces.
- WordPress Questions For Interview: What are the features of WordPress?
Answer: The key features of wordpress are –
Full standards compliance
No rebuilding
WordPress Pages
WordPress Links
WordPress Themes
Cross-blog communication tools
Comments
Spam protection
Full user registration
Password Protected Posts
Easy installation and upgrades
Easy Importing
XML-RPC interface
Workflow
Typographical niceties
Intelligent text formatting
Multiple authors
Bookmarklets
Ping away - WordPress Questions For Interview: Who is the founder of WordPress?
Answer: Matthew Charles Mullenweg.
- WordPress Questions For Interview: What if I need help after the project?
Answer: That is what we are here for! You will get full training at the conclusion of the project and we will be available for email support following the project when needed. Additional one on one training will be available at an additional cost if needed.
- WordPress Questions For Interview: Are there any limitations to a WordPress web site?
Answer: Not that we have found yet. You can use WordPress for e-commerce sites, membership sites, photo galleries and any other type of site you can think of. The web site is created using the same html code as any other site so there are no limitations there either. I have yet to find a reason not to use WordPress for any client site.
- WordPress Questions For Interview: Do I need to have a blog in order to use WordPress for my site?
Answer: WordPress was originally used as blogging software (and still is) though it has since become popular for web sites also. You do not need to include a blog on your web site in order to use WordPress. We have created a number of sites that do not have any blog at all but the client wanted the ability to update content themselves so we used WordPress.
We do suggest having a blog because it will help with your search engine optimization. Though we only suggest that if you plan on updating the blog on a regular basis, otherwise having a blog without any updates is not going to do you any good. - WordPress Questions For Interview: Will using WordPress help my site show up on Google?
Answer: Yes. That is one of the major selling points of using WordPress is that it includes excellent built in search engine optimization (SEO). With a normal site you would need to include all of the SEO yourself (or hire someone). While it is still recommended that you hire someone for a full SEO campaign if needed, the built in SEO capabilities of WordPress more than enough to get you started.
We will also install additional plugins to help with your SEO when you first launch the site. These are popular plugins that are known to help your rank on search engines such as Google and Bing. - WordPress Questions For Interview: Do I need to know any programming to make updates?
Answer: To initially setup a site and customize it you will, though you don’t need to worry about that because that is what we are doing for you. Once the site is setup we will train you on how to perform the updates (very simple) and you will be good to go. In order to perform the content updates you may need in the future you will not need to know any programming at all. I compared it earlier to using Microsoft Word and it really is that easy!
Forget about having to hire a programmer to make simple text updates on your site from now on, you can go in and do it yourself in a matter of minutes. - WordPress Questions For Interview: Will I have the ability to update my own content?
Answer: That depends on the site/project itself. We have created sites where almost every aspect could be edited by the client (content, navigation, photos, forms, etc) and others where it was a simple setup to allow for the main content areas to be edited. This is something we will discuss when planning the project and determine what your need will be. At the very least you will be able to edit the site content yourself and the ability to add/remove photos.
- WordPress Questions For Interview: How to hide the top admin bar at the frontend of wordpress 3.4?
Answer: Add the below mentioned code in the theme(active) function.php add_filter(‘show_admin_bar’, ‘__return_false’);
(or)
Add the below code in the active theme stylesheet
wpadminbar {
display: none; visibility: hidden;
} - WordPress Questions For Interview: Run Any Query on the Database for WordPress
Answer: The query function allows you to execute any SQL query on the WordPress database. It is best to use a more specific function (see below), however, for SELECT queries.
query(‘query’); ?> - WordPress Questions For Interview: Does the 644 permissions on wp-config.php compromise the username and password to all other users on my shared server?
Answer: This is a limitation of the way PHP is set up on your server. If you previously used MovableType, Perl was probably set up with suexec so Movable Type executed as your user. In this case, PHP is running as the web server user, which is why it has to be at least 444. There is phpsuexec but it seems many hosts don’t use it.
However this is often not an issue on modern shared hosts because even though the file is “world” readable each account is set up with a “jailshell” which keeps people locked in their home directory, and PHP can be easily modified with an open_basedir restriction to keep people from writing PHP scripts to read your files. If you are really concerned, you should contact your host to see what measures they are taking. - WordPress Questions For Interview: How do I prevent my images from being hot-linked by another website?
Answer: You can use your .htaccess file to protect images from being hot linked, or, in other words, being linked-to from other websites. This can be a drain on your bandwidth, because if someone links directly to the image on your site, then you lose the bandwidth.
- WordPress Questions For Interview: How do I prevent comment flooding?
Answer: Comment flooding is when a lot of comments (probably spam) are posted to your website in a very short duration of time. This is only one aspect of the broader problem of comment spam in general, but it can quickly overwhelm a moderator’s ability to manually delete the offending comments.
WordPress manages the worst floods automatically by default. Any commenters from the same IP or e-mail address (other than registered users with manage_options capabilities) that post within 15 seconds of their last comment gets their comment discarded. The time setting can be changed by a number of plugins that extend this functionality. You might also consider one of the many broader spam blocking plugins, such as Akismet, or even turning your comment system over to Disqus.
You could also just change the time setting by directly hacking the core file, but the correct way would be to create and install a very basic plugin and insert the following code:
function dam_the_flood( $dam_it, $time_last, $time_new ) {
if ( ($time_new – $time_last) < 300 ) // time interval is 300
return true; // seconds
return false;
}
add_filter(‘comment_flood_filter’, ‘dam_the_flood’, 10, 3); - WordPress Questions For Interview: How do I redirect users back to my blog’s main page after they login?
Answer: By default, WordPress reroutes a registered user to the Administration Panels after they log into the blog. To change the page, there are WordPress Plugins that can handle the redirect, or you can set the Theme function to handle it. See Function_Reference/wp_login_url.
- WordPress Questions For Interview: Why can’t I delete the uncategorized Category?
Answer: Any Category with a non-zero value for # of Posts in the Administration > Manage > Categories cannot be deleted. The uncategorized Category might be assigned to some Posts, but all Pages are assigned the uncategorized Category. So even though there may be no posts assigned to the uncategorized Category, Pages are included in the count of # of Posts.
The default category cannot be deleted even if it is empty, however you can specify your default categories for posts or links on the Options – Writing page of the admin panel. - WordPress Questions For Interview: How can I have a static front page and posts display on a page called Blog?
Answer: If using WordPress as a CMS, you might want to present readers with a static front page, and then display your posts on another page called Blog. To accomplish that follow these instructions:
Create a Page and use “My Front Page” for the Page Title. Of course, in the content for that Page, you can enter the information you want presented on your site’s front page (see example below if you want to display a post).
Create a Page and call it Blog. Nothing needs to be entered in the content field of this Page.
In Administration > Settings > Reading set the Front page displays to A static page, and select My Front Page for Front page:, and select Blog for the Posts page:.
If you want to further customize your front page, you can create a Template, and fit it to meet your needs:
With the help of the Template Hierarchy article, determine what Template is normally used to display your Pages (e.g. page.php or index.php).
Copy that template to myfront.php. If you were using the WordPress Default theme you would copy wp-content/themes/default/page.php to wp-content/themes/default/myfront.php.
In Administration > Appearance > Editor, edit the myfront.php and change the beginning of the file from:
<?php
?>
id=”post-”> ” rel=”bookmark” title=”Permanent Link to ”>
–>
’); ?> Posted in |
Not Found
Sorry, but you are looking for something that isn’t here.
- WordPress Questions For Interview: How do I disable comments?
Answer: First, unchecked Allow people to post comments on the article on the Options > Discussion panel. This will only disable comments on future posts. Now, to completely disable comments, you will have to edit each past post and uncheck Allow Comments from the Write Post SubPanel. Alternatively, you could run this MySQL query from the command line on a shell account or using phpMyAdmin: UPDATE wp_posts SET comment_status=”closed”;
If your goal is to permanently disable comments, then you should delete the wp-comments-post.php file as well. - WordPress Questions For Interview: How do I disable trackbacks and pingbacks?
Answer: First, unchecked Allow link notifications from other Weblogs (pingbacks and trackbacks.) on the Options > Discussion panel. This will only disable trackbacks and pingbacks on future posts. Now, to completely disable trackbacks and pingbacks, you will have to edit each past post and uncheck Allow Pings from the Write Post SubPanel. Alternatively, run this MySQL query from the command line on a shell account or using PHPMyAdmin: UPDATE wp_posts SET ping_status=”closed”;
If your goal is to permanently disable trackbacks and pingbacks, then you should delete the wp-trackback.php file as well. - WordPress Questions For Interview: How do I change the site admin name?
Answer: To change your Admin Name, in the Administration Panel, choose the Users->Your Profile tab. Make your changes there. However, you are not able to change the username from within the Administration panel. In order to do this you must directly edit the MySQL database, however this is not recommended as your username is not often seen by other users.
- WordPress Questions For Interview: How do I find the absolute path I need for uploading images?
Answer: To find the absolute path of a page, absolutepath.zip will help you. Download, unzip, ftp to the location of the page / image / directory and then call the file in your browser – http://www.example.com/images/absolutepath.php
- WordPress Questions For Interview: Can I rename the WordPress folder?
Answer: If you have not already installed WordPress, you can rename the folder with the WordPress files, before, or even after uploading the files.
If you have already installed WordPress, and you want to rename the folder, login to the weblog as the administrator and change the following settings in Settings > General:
WordPress address (URI):
Blog address (URI):
Once you have done this, you can rename the directory or folder with the WordPress files in it. - WordPress Questions For Interview: How can I hide my blog from people?
Answer: Whether you are testing a new version of WordPress, setting up a new blog or have some other reason to limit access, the following information may help you keep unwanted visitors out.
Apache
There is no guaranteed way to do this. You can use the .htaccess file (which also contains your permalink code) to check for certain IP addresses and prevent them from viewing your site. This will only stop the IP address, not the person, so if they have access to an allowed IP address, they can get to your page. One tutorial for this is located at Clockwatchers.com
An .htaccess file can also be used to prevent others from “hot-linking” to your images (bandwidth theft) or to set up a password protected blog.
Apache Basic Authentication
To require a password to access your site using .htaccess and .htpasswd: Clockwatchers.com .htpasswd.
Tools that help you create the files necessary to password protect your site: Clockwatchers.com .htaccess And .htpasswd Tools
Note: When your site is accessed the password is encoded weakly using Base64 and can be easily intercepted and decoded.
Windows IIS Basic Authentication
To require a password if your site is hosted on IIS, you can deselect Allow Anonymous Access and select Basic Authentication. You’ll also need to have a username with a password.
Note: When your site is accessed the password is encoded weakly using Base64 and can be easily intercepted and decoded. - WordPress Questions For Interview: How can I get WordPress working when I’m behind a reverse proxy?
Answer: In some setups, it’s necessary to use something other than the HTTP_HOST header to generate URLs. Reverse proxies take the original request and send it to one of a group of servers. To do so, it overwrites the HTTP_HOST with the internal server’s domain. When that domain is not publicly accessible, at best your images might not load correctly, at worst, you’ll be stuck in a redirect loop. To fix this, figure out which header has the right domain name and add a line to your wp-config.php file that overwrites HTTP_HOST with the correct hostname.
If you need to use SERVER_NAME, add this line to wp-config.php:
$_SERVER[‘HTTP_HOST’] = $_SERVER[‘SERVER_NAME’];
If you need to use HTTP_X_FORWARDED_HOST, add this line to wp-config.php:
$_SERVER[‘HTTP_HOST’] = $_SERVER[‘HTTP_X_FORWARDED_HOST’]; - WordPress Questions For Interview: Do I really need MySQL?
Answer: You certainly need the MySQL database server to power your WordPress blog. In fact, WordPress only supports the MySQL database server. Listed are the PHP and MySQL requirements:
WordPress server requirements for Version 3.2:
PHP version 5.2.4 or greater
MySQL version 5.0.15 or greater
(Optional)(Required for MultiSite) Apache mod_rewrite module (for clean URIs known as Permalinks) - WordPress Questions For Interview: Can I use a database other than MySQL?
Answer: Other databases are not supported at the moment.
There are several other excellent database storage engines, such as PostgreSQL and SQLite that WordPress is interested in supporting in the future. Supporting multiple databases is trickier than it sounds and is not under active development, although there are plenty of architectural discussions about the best approach to take. Approaches for increasing the number of supported databases are discussed at Using Alternative Databases. There is a PostgreSQL port of WordPress available called WordPress-Pg. - WordPress Questions For Interview: Why does WordPress use MySQL?
Answer: MySQL is extremely fast. It is also the most widely available database server in the world. Open-source and free, MySQL is supported by thousands of low-cost Linux (and Windows!) hosts, which means a very low barrier to entry for anyone wanting to start a WordPress (or database-driven) website. MySQL’s documentation is useful, cogent and thorough. (Note: it may be intimidating if you are new to all this.) Add to all that the fact that users are able to directly manipulate MySQL with phpMyAdmin, developed expressly for that purpose, and it is obvious that MySQL is the best choice. Of course, WordPress insists on the best.
- WordPress Questions For Interview: What is XML-RPC?
Answer: Overview
XML-RPC is a Remote Procedure Calling protocol that works over the Internet.
An XML-RPC message is an HTTP-POST request. The body of the request is in XML. A procedure executes on the server and the value it returns is also formatted in XML.
Procedure parameters can be scalars, numbers, strings, dates, etc.; and can also be complex record and list structures.
Request example
Here’s an example of an XML-RPC request:
POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: betty.userland.com
Content-Type: text/xml
Content-length: 181
examples.getStateName 41
Header requirements
The format of the URI in the first line of the header is not specified. For example, it could be empty, a single slash, if the server is only handling XML-RPC calls. However, if the server is handling a mix of incoming HTTP requests, we allow the URI to help route the request to the code that handles XML-RPC requests. (In the example, the URI is /RPC2, telling the server to route the request to the “RPC2″ responder.)
A User-Agent and Host must be specified.
The Content-Type is text/xml.
The Content-Length must be specified and must be correct.
Payload format
The payload is in XML, a single structure.
The must contain a sub-item, a string, containing the name of the method to be called. The string may only contain identifier characters, upper and lower-case A-Z, the numeric characters, 0-9, underscore, dot, colon and slash. It’s entirely up to the server to decide how to interpret the characters in a methodName.
For example, the methodName could be the name of a file containing a script that executes on an incoming request. It could be the name of a cell in a database table. Or it could be a path to a file contained within a hierarchy of folders and files.
If the procedure call has parameters, the must contain a sub-item. The sub-item can contain any number of s, each of which has a .
Scalar s
s can be scalars, type is indicated by nesting the value inside one of the tags listed in this table: - WordPress Questions For Interview: Tell me Would you initialize your strings with single quotes or double quotes?
Answer: Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
- WordPress Questions For Interview: Run Any Query on the Database for WordPress
Answer: The query function allows you to execute any SQL query on the WordPress database. It is best to use a more specific function (see below), however, for SELECT queries.
query(‘query’); ?> - WordPress Questions For Interview: What is shortcode in WordPress? How we can use it?
Answer: Shortcodes in WordPress are specific codes that allow the developers to do various tasks with minimal effort. Shortcodes are used to simplify tasks such as creating objects or embedding files that require lots of coding in a single line. A Shortcode is synonymous to the shortcut. WordPress has five built-in shortcodes- audio, embed, caption, video, and gallery.
- WordPress Questions For Interview: How to add custom dynamic sidebars in WordPress?
Answer: A Sidebar in WordPress is an area where widgets can be used with a theme and this area is also termed as a Widgetized area. In WordPress, sidebar is created by using a function named as register_sidebar() function. The widget zed area should be registered in WordPress supported the theme as they are presentational. The sidebar function takes only one argument of an associative array of parameters that set the options for the widget area. Wrap $args array and register_sidebar() both are separate functions that can be called on ‘widgets_init’ hooks. In short, with the use of register_sidebar() method/ function users can add sidebars to WordPress. Syntax code for the creation of sidebar-
$args = array(
‘name’ => __( ‘Sidebar name’, ‘theme_text_domain’ ),
‘id’ => ‘unique-sidebar-id’,
‘description’ => ”,
‘class’ => ”, ‘before_widget’ => ‘
‘, ‘after_widget’ => ‘
‘,
‘before_title’ => ”, ‘after_title’ => ‘
‘
); - WordPress Questions For Interview: Explain the template tags in WordPress.
Answer: The template tags are basically PHP functions used to display dynamic information or customized blog template. Here is a list of some of the generally used template tags in WordPress.
Different template tags in WordPress
wp_register()
get_header()
wp_title()
get_sidebar()
get_the_author()
wp_enqueue_script()
category_description()
wp_list_authors()
get_bookmarks() - WordPress Questions For Interview: How to take backup of our WordPress website?
Answer: There are three ways to back up a WordPress website thoroughly.
- WordPress Questions For Interview: Backup Through Hosting?
Answer: Hosting providers offer service that completes daily, complete backups to your WordPress website.
- WordPress Questions For Interview: Backup Files Manually?
Answer: We have to download the entire WordPress directory via cPanel or SFTP program. We can also use WordPress database to backup website data manually.
- WordPress Questions For Interview: Automated Backup with Plugins?
Answer: There are many secure and easy to use WordPress backup plugins available for your use. Just install, configure few settings and you are ready to go. Few of them are: BackupBuddy Premium, BackWPup Free WordPress Plugin, Duplicator Free WordPress Plugin, UpdraftPlus Backup and Restoration Free WordPress Plugin, WordPress Backup to Dropbox Free WordPress Plugin, etc.
- WordPress Questions For Interview: Why WordPress is so popular?
Answer: WordPress is so popular because of its features. It is the most popular content management system (CMS) in the world. It is the first choice of everyone who want to create a website because of its popularity. WordPress features include a plug-in architecture and template system. Nowadays, WordPress is used by more than 19% of the top million websites. It is of many PHP/MySQL content management systems that allow content editors to use a web interface to maintain their websites instead of editing and uploading HTML files to a server.
- WordPress Questions For Interview: Simplicity and Flexibility
Answer:
In-corporate with publishing tools
User Management
Media Management
Full Standards Compliance
Ease Theme System
Extend with Plugins
Built-in Comments
Search Engine Optimized & Multilingual
Open Source - WordPress Questions For Interview: How to make any others pages to front page in WordPress?
Answer: To make your static page as a front page you have to follow these steps
Goto Admin Panel
Select “A Static Page”
Choose you page from “Front page” section
Now your selected page from Front Page is set default front page. - WordPress Questions For Interview: Why WordPress is the best CMS?
Answer: WordPress is the best CMS in the world because of its features and advantages. It offers an open source environment which makes it completely free to manage and install.
There are many reasons why WordPress is considered the best CMS. Some of them are listed below:
Available huge Themes and Plugins
SEO Friendliness and Security
Open source and Free of Cost
A large community of developers and users
Inbuilt Admin User Interface and its Speed - WordPress Questions For Interview: How to change the default length of the excerpt in WordPress?
Answer: To change the default length of the excerpt in WordPress, we have to insert the below-mentioned syntax to the functions.php file and edit the amount of the words that we desire to be displayed in our excerpts.
add_filter( ‘excerpt_length’, function($length) {
return X;
} ); - WordPress Questions For Interview: What are the difference between Tag & Category in WordPress?
Answer: In WordPress categories are hierarchical which means terms can have a relationship with each other like child and parent.
Example: You could have a Category called India, and under India, you could have categories called Delhi, Haryana, and U.P. Categories means for broad grouping of posts.
But Tags are NOT hierarchical which means no relationship between them. Tags means to describe specific details posts. - WordPress Questions For Interview: How we can install plugins in WordPress?
Answer: The quickest way to install plugins on WordPress is through plugin search.
Here are the steps:
On the admin page of your site, click “Plugins,” and “Add New.”
Search for plugins by typing the name or functionality.
You may see a couple of listings
Just select the plugin that you want and click ‘Install Now.’
WordPress will download and install the selected plugin. - WordPress Questions For Interview: How do you update WordPress?
Answer: There are two ways to update your WordPress – one-click update and manual update.
One-click update
All versions of WordPress from 2.7 onwards have this feature. You can update by going to the Dashboard and clicking “Updates” screen. On “Update WordPress,” click “Update Now” for initiating the process.
Manual Update
Replace your WordPress files
Download and unpack the latest zip file.
Deactivate plugins and delete old wp-includes and wp-admin directories on your host.
Using FTP, upload new wp-includes and wp-admin directories.
Upload individual files from a new wp-content folder, and overwrite existing files. Do NOT delete existing wp-content folder or files and folders in the current wp-content directory.
Next, upload new files from the root directory of the latest version to your current directory.
What are the steps to install WordPress theme?
Here are the steps:
In login dashboard, click “Appearance” “Theme” and “Add New.”
On the top of your screen, click “Upload.” Click “Browse,” and select.ZIP file for a downloaded extension. - WordPress Questions For Interview: What is taxonomy in WordPress? Explain
Answer: Taxonomies in WordPress are used to group posts and post types together. Custom taxonomies can help developers create groups and bring them under one head.
There are 4 in-built taxonomies in WordPress- Category, Tag, Link Category, and Post Formats. - WordPress Questions For Interview: How to display menu in WordPress?
Answer: After registering your menus, use wp_nav_menu() to inform your theme where to display your menus. You can add this code to a header.php file for displaying the registered header-menu:
wp_nav_menu( array( ‘theme_location’ => ‘header-menu’ ) ); - WordPress Questions For Interview: Is WordPress dynamic or static?
Answer: WordPress is dynamic. This is because nearly everything in WordPress, including Pages, is generated dynamically.
- WordPress Questions For Interview: How do I edit the contents of a page in WordPress?
Answer: Login to WordPress admin area
If editing a Post, Click “Post” and then click “All Posts.” Find the Post you want to edit and make changes. Click Publish.
If editing a page, Click “Pages” in left column menu, and click “All Pages.” Find the page you want to update and make changes. Click Publish. - WordPress Questions For Interview: How to check if any plugin is active in WordPress?
Answer: With the method is_plugin_active() we can check any particular plugin is active or not.
- WordPress Questions For Interview: How to check if any plugin is active in WordPress?
Answer: include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );
// check plugin using plugin name
if ( is_plugin_active( ‘plugin-directory/plugin-file.php’ ) ) {
// Activated
} - WordPress Questions For Interview: What may be the reason that widgets won’t display in the sidebar?
Answer: Users have to first ensure that whether the themes they are using support the widget they are wishing to add. In some cases, the problem may occur when the function.php or file similar to that is missing. There are chances also this could happen if the user forgets to save the changes made in the widget or to refresh the older page display.
- WordPress Questions For Interview: How to display an image URL from thumbnail in WordPress?
Answer: You we use get_the_post_thumbnail_url(); . You can use this inside loop or outside loop. If you are using this outside of loop then you have to pass post ID otherwise its optional in case inside loop.
- WordPress Questions For Interview: What is wp_enqueue_script() function in WordPress?
Answer: In order to include JavaScript file in WordPress, a special function can be used namely wp_enqueue_script (). In WordPress, the preliminary goal of wp_enqueue_script () is to add a JavaScript file which is one of the WordPress action hooks. In order to use the wp_enqueue_script (), users should need to add JavaScript to each page on the WordPress site.
- WordPress Questions For Interview: How to display the current page title in WordPress?
Answer: You can display current page title by get_the_title()
- WordPress Questions For Interview: What may be the reason that widgets won’t display in the sidebar?
Answer: Users have to first ensure that whether the themes they are using support the widget they are wishing to add. In some cases, the problem may occur when the function.php or file similar to that is missing. There are chances also this could happen if the user forgets to save the changes made in the widget or to refresh the older page display.
- WordPress Questions For Interview: What are the scenarios when the plugin menu is not displayed?
Answer: Users won’t be able to see the plugin menu when their blog is hosted on free wordpress.com as it’s limited with plugin uses. Even the users without an account of administrator-level won’t be able to use the plugin menu.
- WordPress Questions For Interview: At what instance you get locked out of your WordPress admin and look at your website as a blank screen?
Answer: This would likely happen when you have pasted the code from a website with wrong formats, also when you have pasted the code in an incorrect location. It may also happen when your IP is banned
- WordPress Questions For Interview: What ways to use WordPress?
Answer: WordPress can be used in many different ways. It is open to possibilities.
You can use WordPress as the following:
Arcade
Blog
Content Management System (CMS)
Gallery
Portfolio
Rating Website
Shopping Store
Video Collection Site
Membership Site - WordPress Questions For Interview: Alternative CMS of WordPress?
Answer:
Joomla
Drupal
Ghost
Movable Type
Silver Stripe - WordPress Questions For Interview: Template Files List for development WordPress Theme?
Answer: Here is the list of the Theme files recognized by WordPress. Of course, your Theme can contain any other stylesheets, images, or files.
style.css: The main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.
rtl.css: The rtl stylesheet. This will be included automatically if the website’s text direction is right-to-left. This can be generated using the RTLer plugin.
index.php: The main template. If your Theme provides its own templates, index.php must be present.
comments.php: The comments template.
front-page.php: The front page template.
home.php: The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.
single.php: The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.
single-{post-type}.php
The single post template used when a single post from a custom post type is queried. For example, single-book.php would be used for displaying single posts from the custom post type named “book”. index.php is used if the query template for the custom post type is not present.
page.php: The page template. Used when an individual Page is queried.
category.php: The category template. Used when a category is queried.
tag.php: The tag template. Used when a tag is queried.
taxonomy.php: The term template. Used when a term in a custom taxonomy is queried.
author.php: The author template. Used when an author is queried.
date.php: The date/time template. Used when a date or time is queried. Year, month, day, hour, minute, second.
archive.php: The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types.
search.php: The search results template. Used when a search is performed.
attachment.php: Attachment template. Used when viewing a single attachment.
image.php: Image attachment template. Used when viewing a single image attachment. If not present, attachment.php will be used.
404.php: The 404 Not Found template. Used when WordPress cannot find a post or page that matches the query. - WordPress Questions For Interview: How to Secure WordPress?
Answer: Security in WordPress is taken very seriously, but as with any other system there are potential security issues that may arise if some basic security precautions aren’t taken.
You need to read “http://codex.wordpress.org/Hardening_WordPress” carefully to understand WordPress security. - WordPress Questions For Interview: Current version of WordPress?
Answer: Need to refer WordPress website: https://wordpress.org/news/category/releases/
- WordPress Questions For Interview: What is the current version of WordPress?
Answer: You need to quote the current version of WordPress available in the market along with the release date.
- WordPress Questions For Interview: What is the role of Editor in WordPress?
Answer: The Editor has access to all the posts, pages, comments, categories, tags, and links. They can create, publish, edit or delete any posts or pages.
- WordPress Questions For Interview: What Do You Do To Improve Your Knowledge?
Answer: The field of IT is very revolutionary. It is extremely important to keep yourself abreast with the new technological developments and this needs you to take some time out of your work schedule so that you can keep sharpening your saw.
- WordPress Questions For Interview: What are the new features in WordPress 5.3?
Answer: Here is the list of new features of WordPress 5.3
Improved features of current WordPress blocks like Block appender, changes in block
Visual differences in the admin panel.
Brand new blocks
Uploading and automatic rotation of high-resolution images
A new way of notifications via Snackbar notices.
New default theme Twenty Twenty
Typewriter experience
Auto-save function - WordPress Questions For Interview: Where is WordPress content stored?
Answer: WordPress contents are stored in MySQL database on Server.
- WordPress Questions For Interview: What is an action hook?
Answer: An Action hook in WordPress is a hook that is triggered at a specific time when WordPress is running and lets you take an action. This can include things like creating a widget when WordPress is initializing or sending a Tweet when someone publishes a post.
- WordPress Questions For Interview: What is a filter hook?
Answer: A Filter hook in WordPress allows you get and modify WordPress data before it is sent to the database or the browser. Some examples of filters would include customizing how excerpts are displayed or adding some custom code to the end of a blog post or headings.
- WordPress Questions For Interview: How do you enable debug mode in WP?
Answer: You can enable debug mode in WP by editing wp-config.php file and changing WP_DEBUG constant value to true
- WordPress Questions For Interview: Consider the following code snippet and explain the purpose of wp_enqueue_script. Can you figure out if something is wrong in the snippet?
Answer: add_custom_script();
function add_custom_script(){
wp_enqueue_script(
‘jquery-custom-script’,
plugin_dir_url( FILE ).’js/jquery-custom-script.js’
);
} - WordPress Questions For Interview: What is the $wpdb variable in WordPress, and how can you use it to improve the following code?
Answer: <?php
function perform_database_action(){
mysql_query(“INSERT into table_name (col1, col2, col3) VALUES (‘$value1′,’$value2’, ‘$value3’);
} - WordPress Questions For Interview: Consider the following code snippet. Briefly explain what changes it will achieve, who can and cannot view its effects, and at what URL WordPress will make it available?
Answer: add_action(‘admin_menu’, ‘custom_menu’);
function custom_menu(){
add_menu_page(‘Custom Menu’, ‘Custom Menu’, ‘manage_options’, ‘custom-menu-slug’, ‘custom_menu_page_display’);
}
function custom_menu_page_display(){
echo ‘
Hello World
‘;
echo ‘This is a custom page
‘;
} - WordPress Questions For Interview: Assuming we have a file named “wp-content/plugins/hello-world.php” with the following content. What is this missing to be called a plugin and run properly?
Answer: <?php
add_filter(‘the_content’, ‘hello_world’);
function hello_world($content){
return $content . “
Hello World
“;
}
Related Article
- SQL Questions for Interview with Answers 2020
- PHP Questions For Interview With Answers 2020
- Java Questions For Interview With Practical Answers 2020
- SEO Questions for Interview with Answers 2020
Inquiries
If You have any questions or suggestions about this WordPress Questions for Interview For Interview with Answers 2020, please feel free to leave a comment below.