That's pretty weird...
A testing version of a website running on Wordpress is just giving me blank pages randomly, on home page, when i call category, whatever... It can change, a page can work, then 5 min later, go blank.
.htaccess issue ?
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Nothing special there... Server trouble ? I just got a plugin that manage Custom types / fields.
And well, only on Chrome, on Windows. That wouldn't be fun on all browsers....
The network panel reveals 1 request, the URL I try to access, with status OK (200).
EDIT : No, it doesn't come form wp_head(), it worked for 2min, then displayed blank pages... I putted debug configuration for Wordpress (according to this link : http://codex.wordpress.org/Debugging_in_WordPress) but it shows no error.
So, It doesn't come from PHP, not from server too. I looked up the HTML / JS part : I checked those pages with W3C validator and get fatal error :
Line 1, Column 1: Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>.
DAT FCKING UTF-8 WITH BOM.
I get it ! Finally !
Actually, Wordpress (3.5.1) contained an UTF-8 with BOM encoded file :
wp-includes\js\jquery\jquery.query.js
I cleaned it, using Emrah Gündüz BOM cleaner (https://github.com/emrahgunduz), written in PHP. I ran it on my local server to check and remove bom from all files.
Now it works like a charm.
Related
I am trying to open my website but it keeps giving me a 404 error. I checked multiple sources and tried different solutions to solve the error, for example, I have tried:
permalinks changes
.htaccess file current code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>)**
However, the problem still exists. Also, after doing the desired changes now I am getting the following error:
This page isn’t working paracha.tech redirected you too many times.
Try clearing your cookies. ERR_TOO_MANY_REDIRECTS
Let me know if anyone can help.
Thanks
I was also facing a similar problem but I solved it with the help of these simple steps.
Go to Settings > General and click Save Changes.
Go to Settings > Permalinks and click on save changes
Go to Settings > General and check what you have for Site Address and WordPress Address. The site address should be where you want the front end of the site to be, and the WordPress address is where your WordPress files live.
Based on the htaccess code you posted, it sounds like both of these settings should be your regular domain name without anything changed.
Also, sometimes after making these changes, you have to flush your permalinks settings. So, go to Settings > Permalinks and just click the Save Changes button again.
I've recently relocated a WordPress site to a new host. I followed the instructions from here and things seemed to go ok. However on the old host the installation was inside a sub-folder (news). On the new host I want it in the public_html folder. All files are up, I have made the appropriate changes to the wp_config file, I have edited the .htaccess file and removed any references to the old path, I have even gone into the wp_options table and made the url changes there.
However for some reason whenever I reference the index.php, it tries to point back to the old sub-folder location. I've looked in the wp-settings, wp-load files etc and for the life of me cannot find where the bad path information is.
I've gone to the wordpress.org site and several other sites, any help would be appreciated.
UPDATE: I deleted my wp_config file and the system asked me to setup, so I did. During the setup it recognized that the database was there, etc, and sent me to the login. I was able to login, looked at the settings, etc and they are all as they are supposed to be.
If I go directly to wp-admin or wp-login it lets me log in with no problem. however when I try to go to the site, nothing, however instead of showing the old url, it now shows a blank screen.
Thanks
First of all make sure that your whole database does not contain any references to the old installation otherwise some redirection may be active. For migrating your database nowadays you use the following tool to make sure that also serialized data does not contain any references to the old URL:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Can you reach your backend? If only the frontend does not work its probably a permalink problem update your permalinks by going to Settings -> Permalinks -> Save (Update)
Check your index.php and the index.php file from the main directory and also from the subdirectory if there any redirection is active
Do a search (and replace) for the content of all files within your WordPress installation and check for any possible hardcoded redirection
It MUST be one of those problems.
If still no success debug your WordPress installation step-by-step (with echo "reached"; die;) to find out WHEN the redirection is happening - important points to check:
index.php file
wp-config.php file
Action Hook 'init'
Action Hook 'template_redirect'
This might also be helpful: http://rachievee.com/the-wordpress-hooks-firing-sequence/
Check your .htaccess file.
You probably have something that looks like this(notice the subfolder):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subfolder/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subfolder/index.php [L]
</IfModule>
# END WordPress
When you should actually have something that looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
First although neither of the two posted answers solved the problem, they both were instrumental in helping me figure out what was wrong, so I voted each of them up.
Since I could log into the admin area, I knew things were pointing to the correct place. But I was still getting a blank page, well it turns out that somehow in the ftp transfer of the backup site to the server, the 'themes' folder didn't make it. Once I uploaded that folder, things are close to being back to normal.
Again, the advice I received helped me tremendously in troubleshooting this sucker. Thanks
Hi Hi have a working website on localhost that I want to move online.
I'm using WP 3.2.1 and I exported the DB from my localhost.
After that I just opened the .sql file with a text editor and replaced all of the 'http://localhost/mysite' with 'http://mynewdomain.com'.
After that I edited the wp-config.php file for the new destination DB online,and so I uploaded everything online.
I can see the index.php page correctly (apart from espanol,chinese etc characters broken) and few other secitons but if I try to reach the wp-admin section ..and whenever i try to browse to any another site's section I get the following error:
Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.***.it/home/wp-content/themes/ottaviano/shortcodes.php:55) in /web/htdocs/www.***.it/home/wp-includes/pluggable.php on line 934
My htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
SOLVED: I had to enable the output buffering and everything is fine again!
Try to temporary remove your .htaccess file and see if you can access your admin again.
Restore you .htaccess and try adding:
define('WP_DEBUG', true);
into the top of your wp-config.php if this doesn't work you also try adding the code below to the bottom of the wp-config.php
ini_set('display_errors',1);
error_reporting(E_ALL);
and hopefully you get some error messages telling you what is going on.
Just had a similar problem when moving a Wordpress site from one domain to the other (Error 500 - page not found).
Apparently a whitespace character found its way before the beginning <?php declaration in a template file.
You can trace the error by inserting a exit("wtf")? in index.php and "WTF-ing" your way to the affected file.
In my case, the reason was a move from Apple-based OS to Windows with differences in CR/LF handling.
I'm using Wordpress 3.1.1 and recently reorganized my page (deleted and moved a lot of pages). Now I get 404-errors when accessing some pages (all posts and tags work fine).
I can disable the permalinks and then access all pages without problems. I can also rename the pages (e.g. contact --> contact1) and all links work again for the new names. However, if I rename them back, I get the same 404 error again. It seems like some kind of caching-problem. Any ideas how to fix it? Thanks!
My .htaccess for the root directory:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Try clearing your 'trash' can in Wordpress, annoyingly items in the trash area still use a permalink, and when accessing those links you'd get 404 message.
Also delete your htaccess file (if it has no additional settings in it), and the reset your permalink settings.
Ian.
I finally solved it. I realized, that there were some page names, that produced a server 404 and some, that don't. Then I took a closer look at my directory structure:
I access my blog from the root path (not the worpdrpess-directory which is located in it). So I can enter
www.myurl.com
instead of
www.myurl.com/wordpress
So far, so good. However, I had some files in my root directory, that had the same name as the page I was trying to access.
Eg. if there is a contact.abc (the extension doesn't matter) in the root folder, then getting
www.myurl.com/contact
will produce a 404-error. If I rename the file everything works fine. Hopefully, that will help others as well.
the problem I have with the multilingual plugin (qTranslate), is that it won't switch to another language it gives me 404 when trying to switch the language of posts.
This can be a result of either:
* WordPress is installed in a directory (not root) and you're using default links.
* URL rewriting is not enabled in your web server.
* The web server cannot write to the .htaccess file
I have my htaccess file with 644 and the following code is in there:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
And I'm using a custom permalinks structure: /%category%/%postname%/
but I still have 404 when trying to switch language.
anybody knows what else could be adffecting the translation plugin?
i don't know if this can help, but i had a kind of similar issue, only with the search results. with method get it was working fine for the main language, but english made 404, with method post for english, and german went to the home-page.
then i changed the url in the wp general settings from abc.com/def to abc.com (i had the directory in both fields and removed it from both). wp is not in www, but www-directory is redirected to the wp-folder. so the subdir was not necessary anymore (had it put for development). and, don't know why, but after this, the post method-search worked well like described in the wp-forum ( http://www.qianqin.de/qtranslate/forum/ ) where you can find lots of useful tips for qtranslate issues. also applying the gettext might help: http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=294&sid=5be0c994e226ab99b5bed7c28a250bab
hope this helps.