常见问题集：疑难排解 Back to FAQ
How do I find more help?编辑
There are various resources that will help you find more help with WordPress, in addition to these FAQ. You can also increase your search capabilities by adding the Codex and Forum Searcher Plugin and search both the Codex and Forum from your WordPress Administration Panels. Click on one of the search results and the page will open in a new window or tab so you can have the article or discussion open while working on WordPress.
- Finding WordPress Help
- Using the Support Forums
- Resources and Technical Articles about WordPress
- Installation Problems
Are there are any problems with using MySQL 4.1.7 for WordPress?编辑
Where can I find help with the CSS problems I'm having?编辑
The following are articles that will help you troubleshoot and solve many of your CSS problems:
- Blog Design and Layout
- Finding Your CSS Styles
- CSS Fixing Browser Bugs
- CSS Troubleshooting
- WordPress CSS Information and Resources
Why can't I see my posts? All I see is Sorry, no posts match your criteria?编辑
Clearing your browser cache and cookies may resolve this problem. Also, check your search.php and index.php template files for errors.
Why does the password emailed to me look weird?编辑
If the password emailed to you looks strange, see Solving Garbled Text.
Why do I get an error message about Sending Referrers?编辑
If you got this message when trying to save a post, consider checking Administration > Options > General and make sure both your WordPress address (URI) and the Blog address (URI) do not use 'www'. For example, instead of http://www.sample.com use http://sample.com in those fields. This information orginally reported via http://wordpress.org/support/topic/72235
How do I empty a database table?编辑
How do I fix the following error SQL/DB Error errcode 13 Can't create/write to file?编辑
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.)
Solution: Alter the tmpdir variable to point to a writable directory.
- Find the my.cnf file. On *nix systems this is usually in /etc/.
- Once found, open this in a simple text editor and find the [mysqld] section.
- 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//.
- Save the file.
- Shutdown MySQL by typing mysqlshutdown -u -p shutdown.
- 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.
How do I solve the Headers already sent warning problem?编辑
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.
- Download the file mentioned in the error message.
- Open that file in a plain text editor (NOT MS Word or similar. Notepad or BBEdit are fine).
- Check that the very first characters are <?php
- Check that the very last characters are ?>
To be sure about the end of the file, do this:
- Place the cursor between the ? and >
- 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 is the key noted here.
- Keep that key pressed
- For at least 15 seconds
- Now type > and
- save without pressing any other key at all.
- 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
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
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 two alternatives. One could use Firefox, or remove the if statement on line 1085 and the word "else" on line 1092 of /wp-admin/admin-functions.php .
For example, change this:
Why can't I see the visual rich editor when using Apple's Safari browser?编辑
Description: The visual rich editor in the Write interface (aka "the WYSIWYG editor") does not display when using Apple's Safari browser.
Reason and Solution: In Safari, the visual rich editor will cause the browser to crash immediately upon loading the Write interface. 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 visual rich editor for Safari users. At this point in time, there are two alternatives. One could use Firefox, or de-select "Users should use the visual rich editor by default" in Administration > Options > Writing and install the EditorMonkey plugin.
E-mailed passwords are not being received编辑
Description: When users try to register with your blog or change their passwords by entering their username and email, WordPress indicates that their password has been emailed to them, but it is never received.
Reason and Solution: WordPress uses the standard php mail function, which uses sendmail. No account information is needed. This is not generally a problem if you are using a hosting service, but if you are using your own box and do not have an SMTP server, the mail will never send. If you are using a *NIX box, you should have either postfix or sendmail on your machine; you will just need to set them up (Google for how-to's). If you do not want to go through setting up a complete mail server on your *NIX box you may find ssmtp useful -- it provides "A secure, effective and simple way of getting mail off a system to your mail hub". On a Windows machine, try a sendmail emulator like Glob SendMail.
More help can be found on the forums at: http://wordpress.org/support/topic.php?id=24981
As a plugin-based alternative, you could try wpPHPMailer. It "enables WordPress to send e-mail via SMTP instead of via PHP's mail() function (aka sendmail)."
How do I get the Quicktag <!--nextpage--> back?编辑
For some reason, the <!--nextpage--> Quicktag button was "removed" in 1.5.1. To get it back, open wp-admin/quicktags.js in a text editor and locate this section (starting at line 135):
/* edButtons[edButtons.length] = new edButton('ed_next' ,'page' ,'<!--nextpage-->' ,'' ,'p' ,-1 ); */
Just remove the /* and */ lines to uncomment the block of code. That should return the button to your editing windows.
I used the Quicktag <!--nextpage--> in a post so why doesn't it work?编辑
In some Themes, such as the WordPress Classic Theme, you may see the <!--nextpage--> work properly on your main page, but other Themes, such as the WordPress default Theme, may only show the page break when viewing the posts individually. It may be necessary to change your Theme's template page.php or index.php file to make this feature work according to your wishes. You'll need to add the following:
<?php wp_link_pages(); ?> ?
MySQL Error 28 编辑
You get the following error:
Error code 28: No space left on device
This is a MySQL error and has nothing to do with WordPress directly; you should contact your host about it. Some users have reported that running a "repair table" command in phpMyAdmin fixed the problem.
If you get this error, check all filesystems in which MySQL operates. If you followed recommendations to split datadir, tmpdir and log files into dedicated filesystems, more than one filesystem is involved. In addition, be aware that MySQL often creates temporary tables for some queries. Most of these are placed in tmpdir; however, some may be found in the database directory (e.g. ALTER TABLE). Also, ensure that sufficient free disk space is available for MySQL.
It could be because:
- you are out of space on /tmp (wherever tmpdir is), or,
- you have too many files in /tmp (even if there is lots of free space)
Relevant discussion threads:
Why are the Quote Marks escaped or not escaped?编辑
If you write plugins, or use a plugin like RunPHP, or make advanced custom templates, you may eventually find yourself dealing with data in the database. WordPress usually manages this data for you in such a way that it is immediately usable. There are circumstances though (especially if you are dealing directly with the database without using WordPress) where you will experience weirdness.
For example, quote marks cannot be stored directly in the MySQL database. MySQL uses quote marks in its SQL language. When a quote mark is used, for example, in a post, When the post is saved to the database, every quote mark gets escaped. That means a backslash character is prepended, which signifies that the next character should be taken as part of the input, and not as part of the SQL command.
For example, if you are adding the following in your post:
...an article about "Happiness" is at <a href="http://example.com/happy" title="Happiness">Happiness</a> if you would like to read it...
Is actually imported into the database looking like this:
...an article about \"Happiness\" is at <a href=\"http://example.com/happy\" title=\"Happiness\">Happiness</a> if you would like to read it...
When pulling data out of the database, the backslashes may not always be automatically removed. If this becomes an issue, you can use the stripslashes() PHP function on the text.
Why do I get a blank page when I submit a comment?编辑
Description: When anyone tries to comment on a post, the window goes blank and the comment doesn't appear to have been recognised by WordPress.
Reason and Solution: The Theme that you are using is missing a critical part of the comment form so WordPress doesn't know which post the comment refers to. You need to check the comment.php in your Theme and ensure that the following code appears within the form.
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
Relevant discussion threads:
How to fix my site statistics problem on a WordPress 2.x blog hosted at Dreamhost?编辑
Dreamhost has a kb/wiki post about this called, Making stats accessible with htaccess.