WordPress Troubleshooting
I’m digging more and more into WordPress. Today I changed my permalink structure to use the mod_rewrite functionality. This helps me keep the same structure of my URLs that appear on blogger. As soon as I saved my changes, my entire site gave me errors.
I downloaded the source code for options-permalink.php in the administration folder and saw that it was writing to the .htaccess file. I can’t see this file in my WS_FTP client, so I had to go to the command line of DOS and type the simple acronym “FTP”.
ftp] open
To lewismoten.com
Connected to lewismoten.com.
220 ProFTPD FTP Server ready.
User (lewismoten.com:(none)): xxxxx
331 Password required for xxxxx.
Password:
230 User xxxxx logged in.
ftp] cd /var/www/html
250 CWD command successful
ftp] recv
Remote file .htaccess
Local file c:\htaccess.txt
200 PORT command successful
150 Opening ASCII mode data connection for .htaccess (3660 bytes)
226 Transfer complete.
ftp: 3704 bytes received in 0.00Seconds 3704000.00Kbytes/sec.
ftp] send
Local file c:\htaccess.txt
Remote file .htaccess
200 PORT command successful
150 Opening ASCII mode data connection for .htaccess
226 Transfer complete.
ftp: 3706 bytes sent in 0.00Seconds 3706000.00Kbytes/sec.
ftp] bye
221 Goodbye.
So looking at that .htaccess file, I saw that WordPress changed my original text from “ErrorDocument 404 /404.php” to “ErrorDOcument 404 /404.php# BEGIN WordPress”. There was a lot of stuff that it added regarding the RewriteEngine, but my concern was focused on that first line.
It changed the “o” in document to upper-case, and appended a comment rite off of the end of my URL. I separated it into two lines and restored the ErrorDocument keyword back to its original state. After uploading the file back onto the site, everything worked fine.
Tags: WordPress, .htaccess, FTP, mod_rewrite, Troubleshooting
October 2nd, 2005 at 4:42 am
Wheew… Glad you got it working!