Changing www prefix in General Settings and Interior Links

This code could help you, just change mysite.com and www.mysite.com and go to phpMyadmin run that Sql code: UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_options SET option_value = REPLACE(option_value, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_posts SET post_content = REPLACE(post_content, ‘mysite.com’, ‘www.mysite.com’); UPDATE wp_posts SET post_excerpt = … Read more

Change homepage url

i think this can help you: use the below code in your theme’s functions.php function redirect_homepage() { if( ! is_home() && ! is_front_page() ) return; wp_redirect( ‘http://siteurl.com/news’, 301 ); exit; } add_action( ‘template_redirect’, ‘redirect_homepage’ );

Remove HTTP: from the site URL and just keep // in it

To remove http: and https: from all links, use the following script: add_action( ‘plugins_loaded’, ‘wpse_232287_init’ ); function wpse_232287_init() { // Initiate the function ob_start( ‘wpse_232287_remove_http’ ); } function wpse_232287_remove_http( $buffer ) { // Check for a Content-Type header, only apply rewriting to “text/html” or undefined $headers = headers_list(); $content_type = null; foreach ( $headers as … Read more

How to set ipv6 address as siteurl?

I think your problem here is the esc_url() function which is used to sanitize a lot of the URLs used in wp-core. If you have a look at the function definition in formatting.php you’ll see that the regex in line 2627 is filtering out [ and ]. But fortunately you can also see that in … Read more

Changing Site Address (URL) causes 404

Go to phpMyAdmin and select the database for the website. Go to the “wp_options” table and edit the first option (option_name: siteurl) from “http://www.example.com/wordpress” to “http://www.example.com/somethingelse“. In the same “wp_options” table, look for “option_name: home” and change the URL there too. Now, rename your current .htaccess file to .htaccess_old and create a new blank .htaccess … Read more

Dynamic URL to reference custom PHP files

I’m not positive I understand the question, but if you’re just trying to get the site URL, you can use the get_site_url() WP function. So, like this: $siteURL = get_site_url(); header(“=Location: $siteURL” . “/myoriginalformpage/?success=”, $success); And you can change the parameters of get_site_url() to specify the path and to display ‘https’ or ‘http’. But if … Read more