We have are building a WordPress site on our intranet site and wish to connect it to a Microsoft SQL Server. I have downloaded and configured PHP and PHP Manager on IIS. I have also downloaded SQL Server DLL from the list of answered questions that popped on as I was typing the title of this thread. I downloaded those DLLs inside the PHP folder as instructed. When I fired up the server address to install WordPress, I was prompted to provide SQL DB name, username, password and DB hostname. I have also downloaded wp-db-Abstraction plugin, put the wp-db-abstraction.php file into the folder where the WordPress files are saved, put the wp-db-abstraction folder into wp_content as instructed by the online article I was reading. Inside this folder, there is a db.php file. I also copied this db.php file into foldername where the rest of the downloaded WordPress files reside. When I clicked to continue, I got the following error messages: Warning: mysqli_real_connect(): (HY000/2002): No … [Read more...] about How do I configure WordPress to talk to a Microsoft SQL Server database?
Exec query string sql server
I don't know how to turn some WP QUERY parameters into url query strings. Most of them are straight forward, but there are some I don't know how to get working. For example, for these WP_QUERY parameters: $args = array( 'post_type' => 'post', 's' => 'keyword', ); the query string for this is: ?s=keyword&post_type=post What is the query string for the 'after' parameter with value '24 hours ago'. For example, this WP_QUERY gets posts created in the last 24 hours: $args = array( 'date_query' => array( array( 'after' => '24 hours ago', ), ), ); But I don't know the query string for it. This doesn't work: ?after=24%20hours%20ago Any help appreciated. … [Read more...] about Query String for the WP_QUERY parameters
I am trying to redirect a default WP login form, if it's HTTP referer contains some specific query string parameter. Scenario: I need to redirect new users (the ones who just created their passwords using the link in their e-mail) to my custom login form, once the password is generated. The steps in WP password creation go like this: /wp-login.php?action=rp (this is the link you get in your e-mail, you type your new password there) /wp-login.php?action=resetpass (this is the screen where it says your password was saved and you can login) /wp-login.php (once the password is created, there is no query parameter anymore) I am able to redirect it when the action=resetpass argument is present, but that way the password won't get generated and my custom form thows "wrong password" error. My thinking is: I should be able to redirect the wp-login.php page if it's HTTP referer contained action=resetpass argument, that way it would fit my needs just fine. Here's my code: <?php … [Read more...] about Redirect a login form, if referer contains URL query string parameter
”Remove query strings from static resources” a common statement which you find while checking the loading time of your site in GTmetrix or any other related tool. We all know that Google is now using page speed to rank pages in their search results, so you must have a closer look at the all the aspects which are slowing down your site. You can use Google Page Speed, Pingdom Tool or GTmetrix to find out the parameters which are affecting the speed of your site and take action to rectify those issues. Today in this post, we will take remove query strings from static resources a very common parameter which affects loading speed of a site. You can’t cache a link with a “?” in its URL. The query string is a method used by developers of WordPress tools to pass the content values or to carry the version detail. Remove query strings from static resources Now, the question is how to remove query strings from static resources to make sure that it is not affecting … [Read more...] about How to Remove Query Strings From Static Resources