Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Fist I was using default option of permalink and everything was fine (speed is ok, my own created theme is working fine) but now I change default structure to post name structure of permalink now I am not getting 404 error but the problems are :

1 - Whole website is loading very slow (pages,post) .

2 - My custom theme is not working fine means styles are not working on single page or single post.

I checked my .htaccess file where the code is :

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress_1/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress_1/index.php [L]
</IfModule>

# END WordPress

Note : wordpress_1 is directory name.

share|improve this question
add comment

1 Answer

Your .htaccess should not be modified on the WordPress part, so it should always be:

# 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

It looks like if you have your WordPress install in a Subdirectory of the folder you map your domain to. In this case, you will have to do the following:

Copy your WordPress index.php into the root directory, and change the path of require('./wp-blog-header.php'); to use your directory instead. Should be like this:

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require('./wordpress_1/wp-blog-header.php');

You may also need to copy your .htaccess into this directory.

In your WordPress Settings you have to change the option WordPress URL to http://yourdomain.com/wordpress_1 while leaving the option Siteurl at http://yourdomain.com/.

This should do the trick for your Styles and Performance!

share|improve this answer
    
I have htdcos/wordpress_1/index.php –  Bhuvnesh Gupta Jan 17 '13 at 10:33
    
Yeah, as I expected, so this solution should work for you. –  fischi Jan 17 '13 at 10:33
    
Sorry! I think speed is now ok but when I click on any post it take me to localhost/xampp –  Bhuvnesh Gupta Jan 17 '13 at 10:39
    
Can you post a Link to that? –  fischi Jan 17 '13 at 10:49
    
I can not put my Link here because it is on localhost of company's computer. It's a protocol. –  Bhuvnesh Gupta Jan 18 '13 at 5:30
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.