-1

I am looking to upload a htaccess file or amend the existing htaccess, assuming there is one being used by WordPress.

All i want to achieve is denying access to my WordPress site and allow specific IPs. I know how to do this and already achieve this elsewhere but haven't done this type of config on WordPress

I bought my Word press hosting through WordPress and i connect the SFTP to the details they provide. And it appear to be connecting to the htdocs directory where normally i expect to put the htaccess file. However putting the htaccess here does not work. It doesnt do anything.

I did read that WordPress has to create the htaccess file

WordPress automatically generates .htaccess file because it is required to properly redirect permalinks. If your .htaccess file is missing, then the first thing you need to do is to visit Settings » Permalinks page and click on ‘Save Changes’ button without changing anything.

This doesn't appear to work or i am not seeing the root of my site.

my htdocs:

  • htdocs
    • wp - shortcut with underscores either side of WP
    • wp-content - directory
    • wp-load.php - shortcut
    • wp-config.php - php file
    • wp-jetpack-temp - directory

What am i missing here?

Thanks

  • 2
    Maybe .htaccess files hidden by default. Which software you're using to connect? – Mostafa Baezid Jul 22 at 12:26
  • 2
    if you bought your hosting through Wordpress they should be providing you with support - have you asked them this question? – mozboz Jul 22 at 12:30
  • 1
    Does Wordpres.com even support .htaccess in the conventional sense? Before you uploaded your .htaccces file, was there an existing .htaccess file you downloaded and overwrote? What is your URL format? Does it contain index.php? – MrWhite Jul 23 at 13:47
  • @MrWhite - I dont know if wordpress supports this. There was no existing htaccess file no. The root of the site doesnt feel like its the actual root. So i am gonna assume i dont get to access all of the files in my installation/ web server. Which kinda sucks. – user2007920 Jul 23 at 23:05
1

If this question refers to Wordpress.com then your question should be asked of their support rather than here.

In general though... just a thought...,

htaccess files are hidden files so the file name is preceded with a dot/period, ie. '.htaccess'.

If you are using an FTP/SFTP client, they sometimes do not show hidden files by default, so you need to enable that setting in order to see hidden files?

Wordpress doesn't need to create its own htaccess file but it does need specific content within it, which is what resetting Permalinks does. For self-hosted Wordpress sites, the required content can be found here:

htaccess for Wordpress

| improve this answer | |
  • Yes i will pursue them but i am trying here too. Not sure i see the issue there tbh. Was hoping for suggestions to help not told i shouldn't be here. I use FileZilla which doesn't hide htaccess files. I should have said that when i upload the file i can see it, its just not functioning. – user2007920 Jul 22 at 21:44
  • It doesn't hurt to ask and I'd hate to discourage you.. Question guidelines here suggest WP.com queries should head in that direction, thats all. wordpress.stackexchange.com/help/on-topic – t2pe Jul 23 at 10:42

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.