How to serve Wordpress from the root directory when it is installed in a subdirectory

Avatar
  • updated
  • Answered

I installed Wordpress into a Wordpress subdirectory.

(domainname.org/wordpress) But I want the Wordpress site to be served

from my root directory. There is a mechanism for that in Wordpress.

The "WordPress Address (URL)" field is set to that Wordpress

subdirectory. The "Site Address (URL)" field is set to my root

directory. But that does not do it.
Further research says that

I need to edit the .htaccess file that came with Wordpress and put that

in my root directory. Now this is my first foray into InMotion hosting,

but I've edited my .htaccess and various other hidden files many times

over many years in my aplus.net account, so that's not a mystery to me.

What is a mystery is finding it! Even when I ask FileZilla to show me

the hidden files, it appears that InMotion blocks it from doing so.
So can someone tell me what I need to do to have my site served from the root directory?


(I initially posted this in a different location, but this looks like a better place to ask it.  Sorry for the duplication!)


Thank you!

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

Hi Brian! I believe that I replied to the other topic you posted, but I'm pasting that reply here since the other post was anonymous and I wanted to make sure that my reply reached you. 

First, I wanted to mention that we have an article on moving your WordPress site from a subdirectory to the main directory. It sounds like you're already familiar with the process, but I'm posting that in case something in there is useful to you.

I would suggest going to cPanel's file manager and enable the viewing of hidden files from within file manager to see if that has an effect on how files are displayed within your FTP client.

Also, are you using your cPanel account as your FTP account, or did you create a new FTP account specifically to work on this site? If so, it's possible that the account simply doesn't have the permissions necessary to view hidden files. Try using your cPanel account as the FTP account and see if that helps.

As a worst case scenario option, I'd suggest editing the .htaccess file in the cPanel file manager. I know it's frustrating to have to work on a site from two separate places, especially when one of them is only required because your preferred option (Filezilla in this case) isn't working, but I'm mentioning it in case it turns out to be the more time efficient option.

I hope one of those suggestions helps resolve the situation, but if not let us know and we'll try to provide further tips.

Avatar
anonymous
Quote from brian godfrey

I used the editor in the cPanel File Manager to follow those WordPress instructions and everything is working fine now.  Thank you very much for your help!

Great to hear, Brian! Glad that it worked. 

Avatar
brian godfrey

I used the editor in the cPanel File Manager to follow those WordPress instructions and everything is working fine now.  Thank you very much for your help!

Avatar
brian godfrey

Hi Ronnie,

   Thanks for answering.  I actually would prefer to keep the Wordpress files in the subdirectory (friendsoflakehodges.org/wordpress) but I want visitors to the site to enter the Wordpress experience directly from the root (friendsoflakehodges.org).  I found different instructions for that - there are a lot of instructions for all kinds of things out there!  The instructions I found say that you copy the .htaccess file from the wordpress directory, editing it and saving it in the root directory.  But I could not find .htaccess in the wordpress directory so I assumed I was being blocked from seeing hidden files.  (I was using the default FTP user that came with the account.)  I just now followed your suggestion and used the cPanel File Manager with hidden files shown and there isn't a .htaccess file there.  So I'll create one from the example in those instructions.

   Hopefully this will solve my problem.  If not, I'll be back! 

   Thanks again,

--Brian

Avatar
anonymous
  • Answer
  • Answered

Hi Brian! I believe that I replied to the other topic you posted, but I'm pasting that reply here since the other post was anonymous and I wanted to make sure that my reply reached you. 

First, I wanted to mention that we have an article on moving your WordPress site from a subdirectory to the main directory. It sounds like you're already familiar with the process, but I'm posting that in case something in there is useful to you.

I would suggest going to cPanel's file manager and enable the viewing of hidden files from within file manager to see if that has an effect on how files are displayed within your FTP client.

Also, are you using your cPanel account as your FTP account, or did you create a new FTP account specifically to work on this site? If so, it's possible that the account simply doesn't have the permissions necessary to view hidden files. Try using your cPanel account as the FTP account and see if that helps.

As a worst case scenario option, I'd suggest editing the .htaccess file in the cPanel file manager. I know it's frustrating to have to work on a site from two separate places, especially when one of them is only required because your preferred option (Filezilla in this case) isn't working, but I'm mentioning it in case it turns out to be the more time efficient option.

I hope one of those suggestions helps resolve the situation, but if not let us know and we'll try to provide further tips.