I have following .htaccess file code after installing wordpress:
#+PHPVersion
#="php73"
AddHandler x-httpd-php73 .php
#-PHPVersion
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Now While I am trying to enable the display of php error by adding htaccess rule in between and by the following line:
php_value display_errors 1
As soon as I remove that line of code, the site is ok. As far I know, that line of code is necessary for showing/displaying any error of php code while visiting one page.
How to enable that in the above .htaccess code?
2
Answers
In wordpress you can enable errors in wp-config.php:
According me, your code is write but you are getting error because you might be possible using php-fpm not mod_php
I am trying here give you the both solution
Below will be for php-fpm
Step 1 : add .user.ini on root directory where you can find wp-config.php
Step 2 : add below code in the above file
Now if you are using mod_php then add below code in .htacess
Adding
phpinfo();
will help you to find that which (mod_php or php-fpm) has been under use.