0

I have exported and imported my wordpress project into live server. Now the problem is I have permalink structures as "localhost" format. When I click on any links in my website it redirects me to localhost. How can I change that? my .htaccess file is given below

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

1 Answer 1

1

It sounds like you have not properly updated the "WordPress Address" and "Site Address" at wp-admin -> Settings -> General, or you have defined WP_SITEURL and WP_HOME in wp-config.php and did not adjust the value when the site was moved.

I can't comment on whether the .htaccess file is correct, though I can say that it would be correct for certain sub-directory installs.

2
  • if my local is localhost and live sever is mysite.com/myproject, what shoul be the wp_siteurl and wp_home ?
    – Joel James
    Commented Jan 5, 2014 at 16:52
  • They most likely should both be http://mysite.com/myproject on the live server.
    – s_ha_dum
    Commented Jan 5, 2014 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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