- Create a new database on the server
- Take note of username and password
- Export local DB to .sql file
- Import .sgl file into new DB
- Create .zip file of everything in drupal
- Unzip to root folder on the server
- Edit setting.php like this:
Look for the DB string in settings.php, it will be in colour. All the other text is greyed out. It will look something like this:
$db_url = ‘mysql://username:password@localhost/databasename’;
Replace username and password
Depending on your server it could also be
$db_url = ‘mysqli: …
There is also the Backup and Migrate module doing it smartly.