404/500 error on /wp-json

Are you trying to use that function without first initiating it in an action? It should be done like so: add_action( ‘rest_api_init’, ‘add_custom_users_api’); function add_custom_users_api() { register_rest_route( ‘route’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘function’, )); }

Change wp-content without changing the name of the folder

Strip the preceeding forward slashes from your rules: Example (incorrect) RewriteRule ^/css/(.*) /wp-content/themes/themename/css/$1 [QSA,L] Example (correct) RewriteRule ^css/(.*) wp-content/themes/themename/css/$1 [QSA,L] All rules (correct) # BEGIN WordPress <IfModule mod_rewrite.c> RewriteRule ^/index\.php$ – [L] RewriteRule ^css/(.*) wp-content/themes/themename/css/$1 [QSA,L] RewriteRule ^js/(.*) wp-content/themes/themename/js/$1 [QSA,L] RewriteRule ^img/(.*) wp-content/themes/themename/img/$1 [QSA,L] RewriteRule ^font/(.*) wp-content/themes/themename/font/$1 [QSA,L] RewriteRule ^plugins/(.*) wp-content/plugins/$1 [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f … Read more

Cant block wordpress readme files

You don’t really need these: Redirect 404 /install.php Redirect 404 readme.html To block readme.html you do this: <files readme.html> order allow,deny deny from all </files> For other kind of files you need do the same just change file name in code.

Rewrite rule never matching

Please try this. First add the rewrite rule you need with this function add_action( ‘init’, ‘rewrite_site_tools_page’ ); function rewrite_site_tools_page() { add_rewrite_rule( ‘^site-tools-([^/]+)$’, ‘index.php?pagename=site-tools&tool=$matches[1]’, ‘top’); } Assuming that page name is site-tools. Now add the tool as query var add_filter(‘query_vars’, ‘wpd_query_vars’); function wpd_query_vars( $query_vars ){ $query_vars[] = ‘tool’; return $query_vars; } Save permalinks. Now if you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)