Logo F2FInterview

Wordpress Interview Questions

Q   |   QA

If you are getting all comments sent to moderation when they should not, it's probably your spam words list in Administration Panel->Options -> Discussion. It probably has either a single character, OR a blank line OR extra whitespace. Take those out.

Right click in the Spam Words box, Select All then Copy and paste it into Notepad to check it.

With spam plugins adding to that list, it's not easy to check for odd data, and it's easy to miss multiple blank lines. This way makes it easier.

Check it carefully :) 

If a WordPress WXR file, an XML file exported from WordPress, is too large to import, there are several things you might try to overcome that limit.

  • Increase the amount of memory a PHP script may consume. Note: If using a shared hosting service, you may need to ask your host to increase the limit.
  1. Increase the memory limit setting in php.ini (e.g. memory_limit = 64M ;). Many hosts may not allow this.
  2. Increase the memory limit via .htaccess (e.g. php_value memory_limit 64M). Many hosts may not allow this.
  3. Increase the memory limit via wp-config.php (e.g. define('WP_MEMORY_LIMIT', '64MB');)
  • Increase the maximum amount of a time a PHP script will run. Note: If using a shared hosting service, you may need to ask your host to increase the limit.
  1. Increase the maximum execution time in php.ini (e.g. max_execution_time = 600 ;). Many hosts may not allow this.
  • Increase the PHP upload files size settings. Note: If using a shared hosting service, you may need to ask your host to increase the limit.
  1. Increase the setting values in php.ini (e.g. upload_max_filesize = 64M ; and post_max_size = 64M ;). Many hosts may not allow this.
  2. Increase the setting values via .htaccess (e.g. php_value upload_max_filesize 64M and php_value post_max_size = 64M). Many hosts may not allow this.
  3. Increase the setting values via ini_set lines in wp-config.php. Talk to your host for the correct values.
  • Increase the file upload size limit and/or file upload space limit:
  1. Login to wp-admin as an administrator.
  2. In the Site Admin navigation box, click "Options"
  3. Scroll down and change the settings for "Max upload file size" and/or "Blog upload space"
  • GZip the file. On some hosting services, a gzipped file can be automatically expanded in the background, without WordPress ever knowing the difference. This can allow you to make the file small enough to be fit into the maximum upload size constraints.
  1. On Windows, use 7Zip to create a gz archive out of the wxr file.
  2. On Linux, use the gzip command line.
  3. Make sure that the resulting file has the file extension of ".gz" before uploading it, as this is often necessary.
  4. This is not guaranteed to work, as it highly depends on the hosting configuration. If this fails, then try another method instead.
  • Break the WordPress WXR file into smaller pieces by separating the data between posts and pasting the header/footer into each file.

1. Always have the header

<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
including all info like category, tags, etc to just before the first <item>

2. Always have the footer

</channel>
</rss>

3. In between, add the posts start with <item> end with </item> and check to see whether the XML file you're creating is less than or equal to 2MB. You'll get the hang of it.

4. As always, before importing the new XML's, backup the database of the blog you are importing the XML files to and might as well export XML file of that blog as well for good measure.
 

To import links (also called blogroll) from another WordPress blog is very easy. This assumes you have an 'old' blog where the links currently are stored, and a new blog where you want to import the links.

    Visit http://oldblog.com/wp-links-opml.php. Then use SAVE AS to save the output, then use Administration > Tools > Import > Blogroll to import the file you saved.

or

Use Administration > Tools > Import > Blogroll at your new blog, and enter http://www.oldblog.com/wp-links-opml.php in the Specify an OPML URL: field.  

WordPress requires access to a MySQL database database to store information. So you need a database.

You can create a new database if:

  1.     You have not already created one on the server
  2.     Your generous host offers you more than one database, and you wish to have a separate database for the blog you are setting up.

It is not essential to create a new database for each WordPress installation.

  • If you are using the same database for multiple WordPress installations, take care to edit the wp-config.php file ensuring that each installation has a unique database prefix.
  • If you are setting up a new database for a new blog, edit wp-config.php, and be sure to get the database name, and other details correct.  

Symptoms: You cannot seem to login after using the right username and password, into your admin account. You get an error message like:

 You are not authorized to view this page
 You might not have permission to view this
 directory or page using the credentials you
supplied. If you believe you should be able
to view this directory or page, please try
to contact the Web site by using any e-mail
address or phone number that may be listed
on the personal.fredsmith.com home page.
You can click Search to look for information
on the Internet. HTTP Error 403 - Forbidden''

Solution: If your account is hosted on a Windows server, it could be a problem with the Directory Indexes. The default configuration of the server is to load index.htm, index.html, default.htm, default.html, default.asp files.

WordPress is done in PHP so the default page is index.php. Now, this is not part of the default configuration so we need to add it. To do this, you need to click on Web Options in the Control Panel. Then scroll down to the Directory Indexes section to add index.php to the Directory Indexes.

If necessary, contact your web host for support in this matter.  

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: