Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Answers-Troubleshooting

These FAQs have been deprecated. You will find the new updated Frequently Asked Questions on the new pages for the FAQ.

Back to FAQ

CSS Problems

The following are articles that will help you troubleshoot and solve many of your CSS problems:

No posts matched your criteria

Clear your browser cache and cookies. This may sort this issue. Read I Make Changes and Nothing Happens for more information. Also, check your search.php and index.php template files for errors.

base64 encoding

If the password emailed to you looks strange, the following article might clear this up: Solving Garbled Text.

Errorcode 13

The Problem: The MySQL variable tmpdir is set to a directory that cannot be written to when using PHP to access MySQL.

To verify this, enter MySQL at the command line and type show variables;

You'll get a long list and one of them will read: tmpdir = /somedir/ (whatever your setting is.) The Solution: Alter the tmpdir variable to point to a writable directory.

The Steps:

  1. Find the my.cnf file. On *nix systems this is usually in /etc/.
  2. Once found, open this in a simple text editor and find the [mysqld] section.
  3. Under this section, find the tmpdir line. If this line is commented (has a # at the start), delete the # and edit the line so that it reads: tmpdir = /writable/dir where /writable/dir is a directory to which you can write. Some use /tmp, or you might also try /home//.
  4. Save the file.
  5. Shutdown MySQL by typing mysqlshutdown -u -p shutdown.
  6. Start MySQL by going to the MySQL directory and typing ./bin/safe_mysqld &. Usually the MySQL directory is in /usr/local or sometimes in /usr/ on Linux systems.

If none of this make sense and you have someone to administrate your system for you, show the above to them and they should be able to figure it out.

Error 28

This is a MySQL error and has nothing to do with WordPress directly. You should probably contact your host about it. Some users have reported that running a repair table command in phpMyAdmin fixed the problem.

You can also check this newsletter on Error 28, and how to avoid it at MySQL.com

Headers already sent

Description: You get a warning message on your browser that says:

Warning: Cannot modify header information - headers already sent by (output started at

Reason and Solution :

It is usually because there are spaces, new lines, or other garbage before an opening <?php tag or after a closing ?> tag, typically in wp-config.php. This could be true about some other file too, so please check the error message, as it will list the specific file name where the error occurred (see "Interpreting the Error Message" below). Replacing the faulty file with one from your most recent backup or one from a fresh WordPress download is your best bet, but if neither of those are an option, please follow the steps below.

Just because you cannot see anything does not mean that PHP sees the same.

  1. Download the file mentioned in the error message by using FTP or whatever file management application your host provides.
  2. Open that file in a plain text editor (NOT MS Word or similar. Notepad or BBEdit are fine).
  3. Check that the very first characters are <?php
  4. Check that the very last characters are ?>
  5. Re-upload the file by using FTP or whatever file management application your host provides.

To be sure about the end of the file, do this:

  1. Place the cursor between the ? and >
  2. Now press the DELETE key on your computer
    • Note to MAC users: The "DELETE" key on a PC deletes characters to the right of the cursor. That's the key meant here.
  3. Keep that key pressed
  4. For at least 15 seconds
  5. Now type > and
  6. save without pressing any other key at all.
  7. If you press another key, you will bring the problem back.

Interpreting the Error Message:

If the error message states: Warning: Cannot modify header information - headers already sent by (output started at /path/blog/wp-config.php:34) in /path/blog/wp-login.php on line 42, then the problem is at line #34 of wp-config.php, not line #42 of wp-login.php. In this scenario, line #42 of wp-login.php is the victim. It is being affected by the excess whitespace at line #34 of wp-config.php.

If the error message states: Warning: Cannot modify header information - headers already sent by (output started at /path/wp-admin/admin-header.php:8) in /path/wp-admin/post.php on line 569, then the problem is at line #8 of admin-header.php, not line #569 of post.php. In this scenario, line #569 of post.php is the victim. It is being affected by the excess whitespace at line #8 of admin-header.php.

No Quicktag buttons in Safari

Description: The Quicktag buttons in the Write interface do not display when using Apple's Safari browser.

Reason and Solution : In Safari, the Quicktag buttons will function, but not as intended. This is due to a bug in Safari, not WordPress. Since the WordPress developers have no way of correcting this, they have chosen to disable the Quicktag buttons for Safari users. At this point in time, there are a few choices to make. One could use Firefox, or comment lines 581 and 589 in /wp-admin/admin-functions.php .

For example, change this:

function the_quicktags () {
// Browser detection sucks, but until Safari supports 
the JS needed for this to work people just assume it's a bug in WP
if ( !strstr($_SERVER['HTTP_USER_AGENT'], 'Safari') ) :
echo '
<div id="quicktags">
<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' 
. __('Help with quicktags') . '">' . __('Quicktags') . '</a>:
<script src="quicktags.js" type="text/javascript"></script>
<script type="text/javascript">edToolbar();</script>
';
echo '</div>';
endif;
}

to this:

function the_quicktags () {
// Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP
//if ( !strstr($_SERVER['HTTP_USER_AGENT'], 'Safari') ) :
echo '
<div id="quicktags">
<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' 
. __('Help with quicktags') . '">' . __('Quicktags') . '</a>:
<script src="quicktags.js" type="text/javascript"></script>
<script type="text/javascript">edToolbar();</script>
';
echo '</div>';
//endif;
}

Emailed passwords not received

Description: When users try to register with your blog or change their passwords by entering their username and/or email, WordPress says that their password has been emailed to them, but it's never received.

Reason and Solution: See Answer in FAQ Troubleshooting

Back to FAQ