My site has two htaccess files. How should I manage them?

Avatar
  • updated
  • Answered

My public_html folder has a file called .htaccess and another called .htaccess2. Their contents are identical except .htaccess2 begins with the lines below. Are both active functioning .htaccess files or should I remove one of them? I want to edit my .htaccess file to harden my WordPress site but am confused by having two files.

php_value memory_limit 128M
php_value upload_max_filesize 32M
php_value post_max_size 32M

How would you rate the customer service you received?

Satisfaction mark by imcoping 5 years ago

Add a comment about quality of support you received (optional):

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

Hello and thanks for contacting us. .htaccess2 should be removed and its settings transferred to the .htaccess file. Your .htaccess should be the only file used. You can check this yourself within your phpinfo.php file.

Learn more about WordPress security with our 10 ways to harden WordPress.

Avatar
imcoping

Hello JT S, Thank you so much for your quick response.  When I tried moving the settings from .htaccess2  to .htaccess, it resulted in a 503 error on the site. Any ideas what might be causing that?

Avatar
anonymous
  • Answer
  • Answered

Hello and thanks for contacting us. .htaccess2 should be removed and its settings transferred to the .htaccess file. Your .htaccess should be the only file used. You can check this yourself within your phpinfo.php file.

Learn more about WordPress security with our 10 ways to harden WordPress.