WordPress Interview Questions & Answers – Part9

81. How do I disable comments?
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.phpfile as well.

82. How do I disable trackbacks and pingbacks?
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.

83. How do I change the site admin name?
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.

84. How do I find the absolute path I need for uploading images?
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

85. Can I rename the WordPress folder?
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.

86. How can I hide my blog from people?
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.
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.

87. How can I get WordPress working when I’m behind a reverse proxy?
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.phpfile that overwrites HTTP_HOST with the correct hostname.
If you need to use SERVER_NAME, add this line to wp-config.php:
If you need to use HTTP_X_FORWARDED_HOST, add this line to wp-config.php:

88. Can I use a database other than MySQL?
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.

89. What is XML-RPC?
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:

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:

90.  In what case you don’t see plugin menu?
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 plugin.

One Response to “WordPress Interview Questions & Answers – Part9”

  1. Riyaz says:

    Wow, Tut2Learn team.

    You guys worked really hard to make this huge questions and answer list. Thank you so much.

    Now I am feeling well prepared.

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Get Alert

    Enter your email address:

  • Categories

  • Twitter

Subscribe Now!
Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.

Subscribe Here

Popup Dialog Box Powered By : XYZScripts.com
  • RSS
  • Facebook
  • Google+
  • Twitter