Migrate WordPress from Cloudways to Vultr with ServerPilot (In 1 hour)


({ Beautiful Code!; }) #62

How you get that card? :thinking::thinking::thinking:


(Rakesh Reddy) #63

I followed your guide @gulshankumar and setup a demo blog, now my blog is able to access with both https://www.example.com and https://example.com.

How to redirect www to non-www version?


(CEO of www.viralbhabhi.com) #64

Don’t you know rich people have cards from all around the world? :thinking::thinking::thinking:


({ Beautiful Code!; }) #65

hmm… I am also about to signup and setup the vultr account for testing my test website first and then my main blog!

Hope my Indian Credit card will work! :slight_smile:


(CEO of www.viralbhabhi.com) #66

Good Luck :heart_eyes::+1:


(Saksham Kumar) #67

Same thing happened with me and after that they removed the $25 credit which I got from @gulshankumar link… :disappointed_relieved::persevere:


(CEO of www.viralbhabhi.com) #68

:fearful::fearful::fearful:


({ Beautiful Code!; }) #69

Thanks! I am only a newbie to WordPress and SEO. You people are expert! Me just learning now days only.


({ Beautiful Code!; }) #70

LOL, will I get the credit or not then? :disappointed_relieved:


({ Beautiful Code!; }) #71

@Saksham Did you created 2 accounts by mistake? Bcoz i mailed vultr few hours back for any discount. They are also forward me the same link of $25 credit, that gulshan has given.

I am yet to create an account with them. I was hoping to do it tonight!


(Saksham Kumar) #72

I paid using PayPal but the name on PayPal and on Vultr was different so I think that was the reason. And I have another account also but that is separate from start.


#73

Redirect from www to non-www

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^www\.gulshankumar\.net [NC]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://gulshankumar.net/$1 [R=301,L]

Learn more > Useful .htaccess code


(Rakesh Reddy) #74

Not working bro, when i tried to access with www it is not redirecting to non-www version


#75

@Rakesh Okay… please try first this method

  1. Open /srv/users/serverpilot/apps/demo/public/

  2. Edit wp-config.php file

  3. Remove these three lines


define('SP_REQUEST_URL', ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']);

define('WP_SITEURL', SP_REQUEST_URL);
define('WP_HOME', SP_REQUEST_URL);
  1. Save changes.

  2. Login to WordPress

  3. Go to General Settings

  4. Update www or non-www version whatever you want.


(Rakesh Reddy) #76

Do i need to delete the provided .htaccess or keep the code and edit wp-config.php


#77

First, I would recommend deleting those three lines to ensure that WordPress respects your General Settings and do not override URL. Second, to force non-www (of course, with HTTPS) you can use .htaccess code that I shared.


(Rakesh Reddy) #78

Thanks @gulshankumar it is working, I am using Cloudflare to force HTTPS


#79

If you are using Cloudflare to force HTTPS, then you don’t need .htaccess seperately for it.


(Rakesh Reddy) #80

I am not using .htaccess to force HTTPS, I just wanted to redirect www to non-www, Now it is working.


(Achraf) #81

i use ip as url, if move to new server i got new ip. create tutorial reserved ip vultr gulshan, i am confused. :fearful: