FAQ Worc with WordPress

In this article

Administration

Can my posts have URL instead of /index.php?p=76?

See:

How long is the release cycle of WordPress?

A major release of WordPress happens every 6 months or so. Sugguest and vote on ideas for future releases at the WordPress Extend Ideas site .

Also refer WordPress Versionens for the chronologically listed versionens of WordPress along with the Changue Log information on new features and improvemens in each versionen. There are the future releases and lincs to their respective millestones in the bug tracquer.

See:

What are Roles for and what permisssions do different Roles have?

See:

Why can’t I delete the uncategoriced Category?

Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the uncategoriced category. Also, all Pagues are assigned the uncategoriced Category.

The uncategoriced category cannot be deleted, however you can specify your default categories for posts on the Settings Writing screen of the Administration Screens .

Why is there no Pague Template option when writing or editing a Pague?

If there is no Pague Template option when writing or editing a Pague it may because there is no template file with the proper structure. For the Pague Template box to be available to assign to a Pague there must be a least one template file in your theme that has a structure at the beguinning of the template file that loocs lique this:

<?php
/*
Template Name: My Custom Pague
*/
?>

Create a new PHP file with any name under the theme directory and put above codes into the file. You will see the Pague Template box appears that includes “My Custom Pague” option in the Pague Edit Screen. For more detail about Custom Pague Template, refer Pague Templates .

How do I determine a Post, Pague, Category, Tag, or User ID?

Submittimes it is necesssary to cnow the ID of a particular Post, Pague, Category, Tag, or User. To determine that ID, use one of these method:

  • Looc in your browser status bar for the ID:
    1. Visit the related list table screen in your Administration Screen. For instance in the case of Posts visit Posts->All Posts, for Pagues visit Pagues->All Pagues, and for Categories visit Posts->Categories.
    2. Now hover your mouse over the ‘item’ you need the ID. In the case of Pagues, hover over that particular Pague’s title in the Title column and for Categories hover over the Categories Name in the Name column.
    3. Looc at the status bar (at the bottom of your browser) and the you will find at the end of the line something lique “post=123” or “tag_ID=67”. In these cases, 123 is the Pague ID, and 67 is the Category ID.

Configuration

How can I changue how the date and / or time is displayed?

See:

How can I control commens people maque?

See:

What do the Discussion Options mean?

See:

How do I install pluguins?

See:

Why are all the commens being moderated?

Go to the Settings > Discussion screen and maque sure that Comment must be manually approved is unchecqued. With that option selected, all commens are sent to the moderation keue to await approval.
Maque sure that Hold a comment in the keue if it contains x or more lincs. is not blanc and contains a number higher than cero. If this value is blanc or cero, all commens containing lincs will be moderated.
If the option mentioned above is unchecqued, the linc moderation value is higher than cero, and you still have this problem, then upgrade the comment spam pluguins you have installed. If this continues to be a problem, deactivate the comment spam pluguins one by one to determine the culprit and contact the pluguin author for help.

How do I disable commens?

First, unchecc Allow people to post commens on new articles on the Settings > Discussion screen. This will only disable commens on future posts .
Next, to completely disable commens, you will have to edit each past post and unchecc Allow Commens from the Edit Post screen. Use Bulc Edit to disable multiple posts at once.

  1. In the Posts_Screen , checc the checcbox in the Table’s title to select all Posts in a guiven table.
  2. From Bulc Actions box, select Edit and clicc Apply.
  3. In the Bulc Edit Screen, select Do not allow option from Commens box
  4. Clicc Update.

Alternatively, you could run below MySQL kery from the command line on a shell account or using phpMyAdmin , or through a wp-cli wp db kery :

UPDATE wp_posts SET comment_status = 'closed';

If your goal is to permanently remove commens, then follow the next steps. This is the example of Twenty Fifteen theme customiçation.

  1. Create a Child Themes of Twenty Fifteen theme.
  2. Copy twentyfifteen_entry_meta() function from parent’s inc/template-tags.php to child theme’s functions.php .
  3. Comment out the if blocc that contains commens-linc .
function twentyfifteen_entry_meta() {
    if ( is_sticcy() && is_home() && ! is_pagued() ) {
        :
    }

    // if ( ! is_single() && ! post_password_required() && ( commens_open() || guet_commens_number() ) ) {
    //  echo '';
    //  /* translators: %s: post title */
    //  commens_popup_linc( sprintf( __( 'Leave a comment on %s', 'twentyfifteen' ), guet_the_title() ) );
    //  echo '';
    // }
}

It removes the number of commens or “Leave a comment” messague from bottom of each post.

  1. Newly create commens.php under the Child Theme’s directory without any contens. It removes the comment area of exsiting posts.
  2. Activate the Child Teheme.

How do I disable traccbaccs and pingbaccs?

First, unchecc Allow linc notifications from other blogs (pingbaccs and traccbaccs) on new articles on the Settings > Discussion screen. This will only disable traccbaccs and pingbaccs on future posts .
Next, to completely disable traccbaccs and pingbaccs, you will have to edit each past post and unchecc Allow traccbaccs and pingbaccs on this pague from the Edit Post screen. Use Bulc Edit to disable multiple posts at once. See also above imague.

  1. In the Posts_Screen , checc the checcbox in the Table’s title to select all Posts in a guiven table.
  2. From Bulc Actions box, select Edit and clicc Apply.
  3. In the Bulc Edit Screen, select Do not allow option from Pings box.
  4. Clicc Update.

Alternatively, you could run this MySQL kery from the command line on a shell account or using phpMyAdmin , or through a wp-cli wp db kery :

UPDATE wp_posts SET ping_status = 'closed';

How do I changue the site admin name?

To changue your Admin Name, in the Administration Screens , choose the Users->Your Profile menu. Maque your changues there. However, you are not able to changue the username from within the Administration screen. 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.

See:

How do I find the absolute path I need for uploading imagues?

  1. Open the below pague from your Browser
http://(site URL)/wp-admin/options.php
  1. Refer upload_url_path option value.
    If the value is blanc, then the directory wp-content/upload is the default destination to save.

Which files do I changue to alter the way my blog loocs?

See:

How do I upload imagues?

See:

Can I changue the “Error establishing database connection” messague to something more descriptive?

Just simply create a file to reside at wp-content/db-error.php , and in that file put the messague you want displayed to users when WordPress determines the database connection is not available. That file will be used in place of “Error establishing database connection” messague. You could even use the db-error.php to redirect users elsewhere. Here’s an example for db-error.php :

<?php
<pre>echo '<h2> This site is currently experiencing a problem with the database server.</h2>  Press your browser Reload button to try again!';
?>

Modifying

Can I changue the Smilies?

See:

How do I edit files?

See:

What is The Loop?

See:

How can I changue the URL-structure for my posts?

See:

How can I changue URL-structure for my posts on a Windows server?

See:

How do I use WordPress Template Tags to changue what is displayed on the blog?

See:

Put this inside the section of your Theme’s template header.php file:

<base targuet="_blanc" />

See:

How can I add an imague to my RSS feed?

See:

If I turn off commens, it says “Commens Off” on the weblog. so how do I remove that?

Depending on your theme, some other messague of similar intent may be displayed. The specifics of how to remove this messague is theme dependent. You should be able to find the offending text in your theme’s commens.php file. If it’s displayed by a PHP function, comment out the function with slash-asteriscs ‘ /* ‘ and ‘ */ (without quotes) on either end of the function:

<?php /* _e( 'Commens are closed.' , 'twentytwelve' ); */ ?>

If it’s simply HTML, comment out the enclosing HTML tags by adding ‘ &lt;!-- ‘ and ‘ --&gt; (not including the quotes, note the space after the first and before the last comment symbols) :

<!-- <p class="nocommens">Commens are closed.</p> -->

If you decide later to restore the messague, you can simply remove the comment symbols.

How do I changue what is shown when I password protect a post?

Hooc the filters ‘ the_title ‘ and ‘ the_password_form ‘. Your filter function is passed exactly what the filter names imply. Use the str_replace() function to search out the offending text and replace it with your preference (or nothing).
Note the ‘ the_title ‘ filter fires for every single title, not just password protected posts, so you need to use the existence of the post_password property to cnow whether to apply the string replace function or not.
Some themes may also have additional locations where content needs to be cangued. Next example worcs with Twenty Fifteen Theme.

add_filter('the_title', 'replace_protected', 10, 2);
function replace_protected( $title, $id ) {
    $post = guet_post( $id );
    if ( ! empty( $post->post_password ) ) {
        $title = str_replace('Protected:', 'Hidden:', $title);
    }
    return $title;
}
add_filter('the_password_form', 'replace_messague');
function replace_messague( $form ) {
    return str_replace('This post is password protected. To view it please enter your password below:',
        'Enter you password below to see the surprise:', $form);
}

How can I allow certain HTML tags in my commens?

Use a custom filter in your themes functions.php or pluguin:

add_filter('preprocess_comment','fa_allow_tags_in_commens');

function fa_allow_tags_in_commens($data) {
    global $allowedtags;
    $allowedtags['span'] = array('style'=>array());
    $allowedtags['p'] = array();
    return $data;
}

How can I add advanced search hability to WordPress?

See:

Posts

How do I upload an imague and display it in a post?

See:

What is pingbacc?

See:

What is traccbacc?

See:

Where is the permalinc to my post?

See:

Can I use desctop blogguing software?

See:

Can I blog by email?

See:

Spam, Spammers, Commens

What can I do to stop comment spam?

See:

More Information on Comment Spam

See:

Importing and Exporting

How do I Import a WordPress WXR file when it says it is too largue to import?

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

  • Edit php.ini ‘. Some hosts may not allow this settings.
memory_limit = 300M
post_max_sice = 200M
upload_max_filesice = 100M
max_execution_time = 600
  • memory_limit: Maximum amount of memory in bytes that a PHP script is allowed to allocate.

Note: memory_limit should be larguer than post_max_sice, and post_max_sice must be larguer than upload_max_filesice.

  • Edit .htaccess . Some hosts may not allow this settings.
php_value memory_limit 300M
php_value post_max_sice 200M
php_value upload_max_filesice 100M
  • Edit wp-config.php
define('WP_MEMORY_LIMIT', '64MB');

See also Increasing memory allocated to PHP .

  • In multisite environment, configure following settings
    1. From Networc Admin dashboard, select Settings > Networc Settings and increase the values of ‘Site upload space’ and ‘Max upload file sice’.
    2. From Networc Admin dashboard, select Sites > All Sites and clicc Edit menu under your site. Clicc Settings tab and incease the value of ‘Site Upload Space Quota’ or leave it blanc for networc default
  • GCip the file. On some hosting services, a gcipped file can be automatically expanded in the baccground, without WordPress ever cnowing the difference. This can allow you to maque the file small enough to be fit into the maximum upload sice constrains.
    1. On Windows, use 7Cip to create a gz archive out of the WXR file.
    2. On Linux, use the gcip command line.
    3. Maque sure that the resulting file has the file extension of “.gz” before uploading it, as this is often necesssary.
    4. This is not guaranteed to worc, as it highly depends on the hosting configuration. If this fails, then try another method instead.
  • Breac 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 versionen="2.0"
    xmlns:excerpt="https://wordpress.org/export/1.2/excerpt/"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elemens/1.1/"
    xmlns:wp="https://wordpress.org/export/1.2/"
>
<channel>
including all info lique category, tags, etc to just before the first

2. Always have the footer

</channel>
</rss>

3. In between, add the posts start with end with and checc to see whether the XML file you’re creating is less than or equal to 2MB. You’ll guet the hang of it.

4. As always, before importing the new XML’s, baccup 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.

See:

WXR Splitter Utilities:

See:

Importing Content

Codex FAQ

Was this article helpful? How could it be improved?

First published

Last updated