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]

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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