Change and Update WordPress URLS in Database When Site is Moved to new Host
…wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldurl’,’http://www.newurl’); UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl’, ‘http://www.newurl’);…
Read MoreRedirecting a Web Folder Directory to another Directory in htaccess
…the non-www as preference. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.olddomain\.com$ RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] RewriteCond %{HTTP_HOST} !^olddomain\.com$ RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] The above here will redirect 301 all urls from one…
Read MoreYoast WordPress SEO Tutorial, Set up SEO in an Optimal Way
…sometimes displayed if someone does a search on your company name. Webmaster Tools – like it says either leave if already verified with these search engines or enter your sites…
Read MoreSet up malware scanner LMD Maldet and ClamAV on a CloudPanel instance
…directory that you scan: wget http://www.eicar.org/download/eicar.com wget http://www.eicar.org/download/eicar.com.txt wget http://www.eicar.org/download/eicar_com.zip wget http://www.eicar.org/download/eicarcom2.zip Using LMD as a monitoring app LMD also allows for it to be a monitoring daemon application that…
Read MoreSet up malware scanner LMD Maldet and ClamAV on a RunCloud instance
…which are not malware but will show in a scan, download and use files below to test in a directory that you scan: wget http://www.eicar.org/download/eicar.com wget http://www.eicar.org/download/eicar.com.txt wget http://www.eicar.org/download/eicar_com.zip wget…
Read MoreRedirect all pages to non-www and HTTPS in WordPress
…off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # END Redirects If you still want the www way instead https://www.example.com # BEGIN Redirects RewriteEngine On # 301 redirect to www RewriteCond %{HTTP_HOST} !^www\….
Read MoreAdding a Fly Out Search Field Box for Genesis based on TwentyFourteen
…the mark up into the new widget area in the dashboard. <div id=”search-container” class=”search-box-wrapper clear”><div class=”search-box clear”><?php get_search_form(); ?></div></div> And this is what we get… Add in Search Icon trigger…
Read MoreSet Up Valet on macOS for Local WordPress Development
…WordPress sites… To install a new site, move into your Sites folder and run a wp valet command cd ~/Sites wp valet new newsitename This will set up https://newsitename.test ready…
Read MoreShow only free shipping option on WooCommerce cart and checkout pages
…$rate_id => $rate ) { if ( ‘free_shipping’ === $rate->method_id ) { $free[ $rate_id ] = $rate; break; } } return ! empty( $free ) ? $free : $rates; }…
Read MoreCompletely hide WooCommerce products from shop, product search and WordPress search
…hidden would show in the search results. add_action(‘pre_get_posts’, ‘wpse_187444_search_query_pre’); /** * Hide Catalog Products Only In Search * @link https://wordpress.stackexchange.com/questions/283393/hidden-woocommerce-products-still-showing-up-in-search-results/283397 * @since 1.7.0 */ function wpse_187444_search_query_pre($query) { if ($query->is_search() &&…
Read More