Thursday, January 11, 2018

Anil kr Prajapati

35 Top WordPress Interview Questions And Answers for 1 Year Experienced

image source : google images
In this article I am sharing top 35 frequently asked WordPress interview questions and answers for 1 year experienced. It will surely helpful for experienced WordPress developer.

Question #1 - What is Wordpress?

WordPress is a free and open source popular blogging tool and a content management system (CMS) based on PHP and MySQL. It is completely free of cost and you can utilize it to make any kind of individual and business site.
Question #2 - What are the Features of WordPress?


For engineers, WordPress Have bunches of treats pressed in the engine that you can use to broaden WordPress toward whatever path takes your favor.

  • Theme System
  • Plugin System
  • Custom Content Types
  • The Latest Libraries
  • Easily Ad Management
  • SEO Friendly
Question #3 - How to include a file to a php page?


We include a file using "include('filepath.php') " or "require('filepath.php')" function with file path as its parameter.
Question #4 - How safe is website on WordPress?


The word press is protected to work yet at the same time it is proposed to continue refreshing with the most recent variant of WordPress to avoid from hacking.

<b></b>

Question #5 - What is plugin in WordPress?


Plugins are short arrangement of program which help to stretch out and add to the usefulness that as of now exists in WordPress. The center of WordPress is intended to be lean and lightweight, Plugins at that point offer custom capacities and highlights with the goal that every client can tailor their site to their particular needs.
Question #6 - What is WordPress loop ?


WordPress use PHP code to display post, this code is known as loop.
Question #7 - What are posts in WordPress?

Presents permit you on compose a blog and post it on your webpage. They are recorded backward sequential request in front page of your blog.

Question #8 - What is the use of 'print' in php?


Print commonly used to print text on screen like echo but print has a return type.  you can use with out parentheses with its argument list.
Example 
print('50 PHP Interview questions'); print 'Job Interview questions ';

Question #9 - What is use of count() function in php ?


count() function return total number of elements in an array or something in an object.
Question #10 - What is the difference between Session and Cookie?

Both are used to store user information on server. The main difference between sessions and cookies is that sessions are stored on the server, and cookies are stored on the user's computers in the text file format. Cookies can't hold multiple variable while session can hold multiple variables..We can set expiry for a cookie,The session only remains active as long as the browser is open.Users do not have access to the data you stored in Session,Since it is stored in the server.Session is mainly used for login/logout purpose while cookies using for user activity tracking
Question #11 - How to set cookies in PHP?


We can set cookies like Setcookie("user", "ram", time()+3600);
Question #12 - How to Retrieve a Cookie Value?


We can retrieve a cookie value like - echo $_COOKIE["user"];
Question #13 - How to create a session? How to set a value in session ? How to Remove data from a session?


Create session : session_start();
Set value into session : $_SESSION['USER_ID']=1;
Remove data from a session : unset($_SESSION['USER_ID'];
Question #14 - How to create a mysql connection?

we can create connection by using function mysql_connect(hostname,username,password,database);

Question #15 - How to select a database?


we can select database by using mysql_select_db($db_name); function and we can also select a database by using function mysql_query('use databaseName'); 
Question #16 - What are pages in WordPress?

Pages are unique in relation to posts. They are static and they don't change frequently. You can include pages containing data about you and your site.

Question #17 - what are the alternative CMS of WordPress?

There are number of alternative CMS of Wordpress like-


Joomla, Drupal,Ghost, Silver Stripe etc.


Question #18 - What is the use of Slug field in tags?

It is used to specify the tags URL.
Question #19 - What is wordPress Category ?


Category is used to show segments of your site and gathering related posts. It sorts the gathering content into various segments. It is an extremely advantageous approach to arrange the posts.
Question #20 - What is WYSIWYG Editor?


WYSIWYG Editor is similar to a word processor interface where we can edit the contents of the article.

Question #21 - Does WordPress use cookies?


Yes, WordPress have cookies and WordPress uses cookies for verification of users while logged in
Question #22 - From SEO point of view is wordPress helpful?

 It is one of the benefit of using wordpress, it has inbuilt SEO search engine.

Question #23 - What is the current version of wordPress?

You have to keep on eye on the present variant of WordPress accessible in showcase alongside the release date.

Question #24 - How to strip whitespace (or other characters) from the beginning and end of a string ?


We can use trim() function to remove whitespaces or other predefined characters from both sides of a string.
Question #25 - What is the use of header() function in php ?


The header() function sends a raw HTTP header to a client browser.Remember that this function must be called before sending the actual out put.For example, You do not print any HTML element before using this function.
Question #26 - How to redirect a page in php?


we can redirect a page by using header("Location:index.php"); function.
Question #27 - How stop the execution of a php scrip ?


We mostly use exit() function to stop the execution of a page
Question #28 - How to set a page as a home page in a php based site ?


The default name of the home page is index.php in php based websites
Question #29 - How to find the length of a string?


we can use strlen() function to find the length of a string
Question #30 - what is the use of isset() in php?


isset() function is used to ensure if a variable is set and is not NULL
Question #31 - What do you mean by custom field in wordPress ?


Custom field is a meta-data that allows you to store arbitrary information to the wordpress post. Through custom field extra information can be added to the post.

Question #32 - Why does WordPress use MySQL?


MySQL is generally accessible database server and is to a great degree quick. It is an open source and it is accessible at no cost likewise it is upheld by some minimal effort Linux has so its simple for anybody to have their site.

Question #33 - Is it possible to rename the WordPress folder ?

Truly, it is conceivable to rename the WordPress envelope. On the off chance that WordPress is as of now introduced you need to login to the weblog as the chairman and afterward change the settings

WordPress address (URI) :

Blog address( URI) :

In the wake of rolling out the improvements, you can rename the envelope or registry with the WordPress document in it.

Question #34 - How many tables are there in WordPress by default?


There are about 11 tables in WordPress by default.
Question #35 - How you can disable the WordPress comment? 

In the event that you go on dashboard under options- discussion there is a remark " Allow people to post comment" take a stab at unchecking the remark.

More About Interviewing:

Read More

Monday, January 1, 2018

phpMyPassion

35 Common WordPress Interview Questions And Answers for Freshers


WordPress Interview Questions

Here I am sharing top 35 frequently asked WordPress interview questions and their answers for freshers. This list of WordPress interview questions and answers will be helpful for WordPress beginner who just started their career as WordPress developer, and surely help you during interview session.

Question #1 - What is WordPress?


WordPress is a free and open source popular blogging tool and a content management system (CMS) based on PHP and MySQL. It is completely free of cost and you can utilize it to make any kind of individual and business site.
Question #2 - What are the Features of WordPress?


For engineers, WordPress Have bunches of treats pressed in the engine that you can use to broaden WordPress toward whatever path takes your favor.

  • Theme System
  • Plugin System
  • Custom Content Types
  • The Latest Libraries
  • Easily Ad Management
  • SEO Friendly
Question #3 - How to include a file to a php page?


We include a file using "include('filepath.php') " or "require('filepath.php')" function with file path as its parameter.
Question #4 - How safe is website on WordPress?


The word press is protected to work yet at the same time it is proposed to continue refreshing with the most recent variant of WordPress to avoid from hacking.
Question #5 - What is plugin in WordPress?


Plugins are short arrangement of program which help to stretch out and add to the usefulness that as of now exists in WordPress. The center of WordPress is intended to be lean and lightweight, Plugins at that point offer custom capacities and highlights with the goal that every client can tailor their site to their particular needs.
Question #6 - What is the use of WordPress General Setting?


WordPress general setting is used to set the basic configuration settings for your site.
Question #7 - What are posts in WordPress?

Presents permit you on compose a blog and post it on your webpage. They are recorded backward sequential request in front page of your blog.

Question #8 - What is WordPress Reading Setting?


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.

Question #9 - What is the use of Media setting?


It is used to set the height and widths for the images which you're going to use into your website.
Question #10 - What is Permalink setting?

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.
Question #11 - How to set cookies in PHP?


We can set cookies like Setcookie("user", "ram", time()+3600);
Question #12 - How to Retrieve a Cookie Value?


We can retrieve a cookie value like - echo $_COOKIE["user"];
Question #13 - How media files can be inserted into the Wordpress site?


Media files can be inserted to your Pages or Posts from libraries, from local storage or from URLs.
Question #14 - What is Media Library?

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.

Question #15 - What is Preview Post in wordPress?


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.
Question #16 - What are pages in WordPress?

Pages are unique in relation to posts. They are static and they don't change frequently. You can include pages containing data about you and your site.

Question #17 - what are the alternative CMS of WordPress?

There are number of alternative CMS of Wordpress like-

Joomla, Drupal,Ghost, Silver Stripe etc.

Question #18 - What is the use of Slug field in tags?

It is used to specify the tags URL.

Question #19 - What is wordPress Category ?


Category is used to show segments of your site and gathering related posts. It sorts the gathering content into various segments. It is an extremely advantageous approach to arrange the posts.
Question #20 - What is WYSIWYG Editor?


WYSIWYG Editor is similar to a word processor interface where we can edit the contents of the article.

Question #21 - Does WordPress use cookies?


Yes, WordPress have cookies and WordPress uses cookies for verification of users while logged in
Question #22 - From SEO point of view is wordPress helpful?

 It is one of the benefit of using wordpress, it has inbuilt SEO search engine.

Question #23 - What is the current version of wordPress?

You have to keep on eye on the present variant of WordPress accessible in showcase alongside the release date.

Question #24 - How to strip whitespace (or other characters) from the beginning and end of a string ?


We can use trim() function to remove whitespaces or other predefined characters from both sides of a string.
Question #25 - What is the use of header() function in php ?


The header() function sends a raw HTTP header to a client browser.Remember that this function must be called before sending the actual out put.For example, You do not print any HTML element before using this function.
Question #26 - How to redirect a page in php?


we can redirect a page by using header("Location:index.php"); function.
Question #27 - How stop the execution of a php scrip ?


We mostly use exit() function to stop the execution of a page
Question #28 - How to set a page as a home page in a php based site ?


The default name of the home page is index.php in php based websites
Question #29 - How to find the length of a string?


we can use strlen() function to find the length of a string
Question #30 - what is the use of isset() in php?


isset() function is used to ensure if a variable is set and is not NULL
Question #31 - What do you mean by custom field in wordPress ?


Custom field is a meta-data that allows you to store arbitrary information to the wordpress post. Through custom field extra information can be added to the post.

Question #32 - Why does WordPress use MySQL?


MySQL is generally accessible database server and is to a great degree quick. It is an open source and it is accessible at no cost likewise it is upheld by some minimal effort Linux has so its simple for anybody to have their site.

Question #33 - Is it possible to rename the WordPress folder ?

Truly, it is conceivable to rename the WordPress envelope. On the off chance that WordPress is as of now introduced you need to login to the weblog as the chairman and afterward change the settings

WordPress address (URI) :

Blog address( URI) :

In the wake of rolling out the improvements, you can rename the envelope or registry with the WordPress document in it.

Question #34 - How many tables are there in WordPress by default?


There are about 11 tables in WordPress by default.

Question #35 - How you can disable the WordPress comment? 

In the event that you go on dashboard under options- discussion there is a remark " Allow people to post comment" take a stab at unchecking the remark.

More About Interviewing:

Read More

Saturday, December 30, 2017

phpMyPassion

Prime Number Program in PHP


Prime Number :- 

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. For example, 3 is a prime number because it has no positive divisors other than 1 and 3.

Prime numbers are below:-

2, 3, 5, 7, 11, 13, 17, 19 ....

Here I am writing the PHP program to check whether a number is Prime or not.

<?php
function CheckPrime($number){
    for($x=2;$x<$number;$x++){
        if($number%$x == 0){
            return 0;
        }
    }
    return 1;
}

$a = CheckPrime(17);
if ($a==0)
    echo 'This is not a Prime Number.....'."\n";
else
    echo 'This is a Prime Number..'."\n";
?>

Output :- This is a Prime Number..

Using the above program you can check whether a number is prime or not in PHP.

Read More
phpMyPassion

Palindrome Number Program in PHP


Palindrome Number :-

palindromic number or numeral palindrome is a number that remains the same when its digits are reversed. Like 53235, 

Below are the example palindrome number:-

121 , 212 , 12321 , 16461

#Steps to Check a Palindrome Number :-

  • Take a Number
  • Now reverse its digit
  • Now compare both the numbers
  • if both are equals to each other then return "Number is Palindrome".
  • else return "Number is not Palindrome"

Here I am writing the PHP program to check whether a number is palindrome or not.

Palindrome Number Program Without of Using PHP Predefined Function :-

<?php
$number = 53235;
$p = $number;
$revnum =0;
while($number != 0){ //echo 'i am';
      $revnum = $revnum*10 + $number % 10 ;//echo '-';
     $number = (int)($number/10);
    //echo '<br/>';
}
if($revnum==$p){
    echo $p.' is palindrome number';
}
else{
    echo 'number is not palindrome';
}
?>


Output :- 53235 is palindrome number

Using function that take a number as an input :-

<?php 
function checkPalindrome($number){
    $p = $number;
    $revnum =0;
    while($number != 0){ 
          $revnum = $revnum*10 + $number % 10 ;
         $number = (int)($number/10);
    }
    if($revnum==$p){
        echo $p.' is palindrome number';
        //return TRUE;
    }
    else{
        echo 'number is not palindrome';
        //return FALSE;
    }
}
echo checkPalindrome('121');
?>

Output :- 121 is palindrome number

Using PHP Predefined Function :-

<?php 
$number = '121';

if(strrev($number) == $number){
    echo $number.' is palindrome number';
}
else{
    echo 'number is not palindrome';
}
?>


Output :- 121 is palindrome number

Using the above program you can check whether a number is palindrome or not in PHP.

Read More

Friday, December 29, 2017

phpMyPassion

Fibonacci Series in PHP


Fibonacci series means to get next term by adding its previous two numbers.

For an example:-

0 1 1 2 3 5 8 13 21

Here I am writing the PHP program to print Fibonacci Series.

<?php

function printFabonacciSeries($number){
    $a = 0; // first number of series
    $b = 1; // second number of series
    echo 'Fabonacci Series <br/>';
    echo $a.' '.$b;
    for($i=2;$i<$number;$i++){
        $c = $a + $b; //print next number of series
        echo ' '.$third;
        $a = $b;
        $b = $c;
    }
}
printFabonacciSeries(9);
?>

Output :- 0 1 1 2 3 5 8 13 21

Alternate Way to Print Fabonacci Series :-

<?php
$number = 9;
$first = 0;
$second = 1;
echo "$first $second "; // 0 1

for($i=1;$i<= $number-2 ;$first=$second,$second=$third,$i++ ) 
{
  echo $third = $first+$second; //print next number of series
  echo " ";
}
?>

Using the above program you can find Fibonacci Series in PHP.

Read More