Menu links only using http after enabling https, unable to redirect http links

RewriteCond %{HTTP_HOST} ^example\.me [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.me/$1 [R,L] You’ve not stated where exactly you are adding these rules in your .htaccess file(s). The order is important. These directives need to go at the top of the .htaccess file, before the WordPress front-controller, otherwise they won’t redirect anything other than static resources. This … Read more

Query WP data with the WPDB API from outside WordPress

Forgot to mention something: file1.php (with all the SQL functions) does include wp-config.php to get the DB info, which could be related to this issue, right? Dollars to doughnuts, this is your problem. You should never, ever, ever need to load wp-config.php directly. Are you trying to access WordPress functions from outside WordPress? Edit To … Read more

Redirect one of two domains on one WordPress installation

You could check the contents of the $_SERVER[‘REQUEST_URI’] array when the site is loaded, by placing the conditional checking logic in your header.php file of your site and then redirect the user to the appropriate language from there. For example in header.php add: $incomingUrl = $_SERVER[‘REQUEST_URI’]; if($incomingUrl == ‘mydomain.dk’) { wp_redirect(URL FOR THIS LANGUAGE); exit; … Read more

All pages showing up as homepage on WordPress website

I have seen this before. It was caused by a permalink saving error, in my case. Go to Settings >> Permalinks. Select a different permalink option than the one you’re currently using. Click “Save Changes” Select the permalink structure you want to use. Click “Save Changes” That fixed it when I encountered the same situation.

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