-2

I am having problem on migrating my Wordpress site from the sub folder to the root directory.

My current website URL is not working on uploading the project on root directory. It's get redirected to the existing path

My current word press site is located on root directory

http://www.macil.com.au/

But it's always redirected to the old existing website path which is

http://www.macil.com.au/Welcome/Home.html

I’ve checked the htaccess file, it is blank what can be the issue?

  • I don't see any redirect on your site – Mark Kaplun Aug 26 '14 at 11:35
  • - Check your Data Base -> wp_options (table) -> 'siteurl' and 'home'(entries) and manually change change for your current site URL. Back your DB before making any changes, in case! – Tara Aug 26 '14 at 15:56
0

Did you update the URL in the DB? It sounds like the site still thinks it's running in the old location which usually indicates the DB still has the old path in it.

I highly recommend the Search and Replace tool that Interconnect IT produces. The stable 2.1 version is my preference.

Make sure you remove this script when you have finished. It's an open door for bad actors into your DB.

0

.htaccess is not a problem for that, but be care with security.

I'm searching and I found the solution here: Giving WordPress Its Own Directory

1- Check your index.php (located at 'public_html') and write on: require( dirname( __FILE__ ) . '/<your-tree-directory>/wp-blog-header.php' ); in your case: require( dirname( __FILE__ ) . '/wp-blog-header.php' ); (if your wordpress files are located at 'public_html').

2- Check your DB and go to: -> wp_options (table) -> 'siteurl' and 'home'(entries) and change for your current site URL. In your case: http://www.macil.com.au/

3- .htaccess file (added in 'public_html' and in your tree directory):

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

# END WordPress

'test' is the URL that you prefer like: www.mydomain.com/test.

I'm ready to answer any questions!

Hope that helps :)

  • People use Downvotes and Comments Strategically for reputation. Not for bad answer... – Neil Aug 26 '14 at 11:02
  • 1
    No, your original answer was bad. Can see why you got downvoted. I would have downvoted you as well originally :-) – Pieter Goosen Sep 17 '14 at 15:34
  • Ok. Is now better answer? It understand? I'm learning English and it's difficult for me. – Neil Sep 17 '14 at 15:55
  • @PieterGoosen, if you want, you can edit my answer for be better and also I will learn more. :) – Neil Sep 17 '14 at 16:01
  • Not necessary, that should do just fine :-). +1 for your effort, and most of all, not just posting the link, but posting all relevant info from the link and keeping the link as credit. Your future answers should be something in this line :-) – Pieter Goosen Sep 17 '14 at 16:05

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.