How to remove the https on Finalizing page

When a user signs up for a free site, enters the username, email address, and select the theme. The user is directed to the Finalizing your site page. This page has a URL and link to the site. Both has https in the URL. I need this to be http. How do I change these links to be http? Thanks.

  • Sajid

    Hello Ed Scott,
    Hope you are doing good today :slight_smile:

    Right now there is no way out of the box to remove the HTTPS from the URL. Pro Sites uses core functions of WordPress, which provides the URL with correct scheme. Since you have configured SSL on your website that's why its displaying the URL with HTTPS.

    However, we can try to override what WP gives back to PS by using the following code. To prevent any issues on other pages, we will only do this on Pro Sites page (page id 14).

    function wpmudev_force_http_on_ps_signup_page ($url, $path, $schem, $blog_id) {
    
    	//only make this change on pro sites page
    	if( is_page( 14 ) ){
    		$url = str_replace('https', 'http', $url);
    	}
    
    	return $url;
    }
    add_filter('site_url','wpmudev_force_http_on_ps_signup_page', 10, 4);

    Try to add above code in functions.php file of your child theme or use it as mu-plugin.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,
    Sajid

  • Ed Scott

    I added the code to the functions.php child in th etheme and this appeared on the top of the page. So I removed the code.

    function wpmudev_force_http_on_ps_signup_page ($url, $path, $schem, $blog_id) { //only make this change on pro sites page if( is_page( 14 ) ){ $url = str_replace('https', 'http', $url); } return $url; } add_filter('site_url','wpmudev_force_http_on_ps_signup_page', 10, 4);
    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home1/a8x2e7k8/public_html/bizsite.io/wp-content/themes/ignition-child/functions.php:10) in /home1/a8x2e7k8/public_html/bizsite.io/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/Helper/Session.php on line 29

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home1/a8x2e7k8/public_html/bizsite.io/wp-content/themes/ignition-child/functions.php:10) in /home1/a8x2e7k8/public_html/bizsite.io/wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/Helper/Session.php on line 29

  • Sajid

    Hello Ed Scott,
    Hope you are doing good today :slight_smile:

    That should not give that error, there seems to be issue while adding the code.

    The only other way to make it work is by actually modifying the core file of plugin. That means you will have to make that change each time you will update the plugin.

    If you are still interested then follow the steps below to make that change.

    1. Download (take backup of this file with different name on your computer) and open Gateway.php file from following location via FTP or FileManager.
    ../wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front/

    2. Find the following line of code on line number 581 nearly within render_free_confirmation function.
    $blog_admin_url = get_admin_url( $blog_id );

    3. Add the following line of code, right after the above code (see screenshot of the end result).
    $blog_admin_url = str_replace('https', 'http', $blog_admin_url);

    4. Save changes and upload back to server by replacing the existing one (don't forget to take backup as mentioned in step 1).

    5. Done!

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,
    Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.