Support » Fixing WordPress » .htaccess and where to access it

  • I cannot find where .htaccess is. I need to make it writeable so that the WordPress Landing Pages plugin works. Any help would be greatly appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    There can be several, one in each folder. You want the one where WordPress is installed, the same as where wp-config.php is. It may be hidden by default, you may need to flip a setting to make it visible.

    Dion

    (@diondesigns)

    If you still haven’t found your HTACCESS files, be aware that they are exclusive to Apache or compatible web servers. HTACCESS files do not exist if your web server software is nginx or IIS.

    I’m having permalink issue too, and found this while working on the problem. In <docroot>/wp-admin/includes/misc.php (<docroot> being your site’s home directory), starting at line 167 (inside the function: save_mod_rewrite_rules() ) we find:

    global $wp_rewrite;
    
    	$home_path = get_home_path();
    	$htaccess_file = $home_path.'.htaccess';

    So you can use get_home_path() to retrieve this location, which is likely your docroot (very likely 🙂 ), and of course .htaccess is called… .htaccess.

    As mentioned above, this holds true for a LAMP environment (Linux/Apache2/mysql/php5), and my observations are for that environment.

    Hope this helps.

    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.htaccess and where to access it’ is closed to new replies.