Jump to content

Recommended Posts

Posted

Hello Everyone!

I have been looking for all over the internet for instructions on how to move a Processwire site from local (Xampp) to a live server. This is important because I don't want the website to be viewed while its being worked on. Does anyone know where I can find any information?

Thanks :)

Posted

I found this very useful when dealing with my dev and live configurations.

Paste and configure in /site/config.php


$base_url  = $_SERVER['SERVER_NAME'];
switch ($base_url) {
	case "samplewebsite.dev":
		// LOCAL CONFIG
		$config->dbHost    = 'localhostdb';
		$config->dbName    = 'processwire';
		$config->dbUser    = 'root';
		$config->dbPass    = 'PaSsWoRd';
		$config->dbPort    = '3306';
		$config->httpHosts = array('samplewebsite.dev', 'www.samplewebsite.dev');
		$config->debug     = true; 
		break;
	case "samplewebsite.com":
		// LIVE CONFIG
		$config->dbHost    = 'livedb';
		$config->dbName    = 'processwire';
		$config->dbUser    = 'username';
		$config->dbPass    = 'pAsSwOrD';
		$config->dbPort    = '3306';
		$config->httpHosts = array('samplewebsite.com', 'www.samplewebsite.com');
		$config->debug     = false; 
		break;
}

  • Like 5

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...