Domanda

I am very new to cms and I am wondering if you fine gentleman can help me get started properly. Just a note, I have spent hours researching my questions and I could not find the answer I was looking for.

  1. I have installed silverstripe locally and i started creating my own site with it. Created a new theme, deleted the old 2. It created some random database for me, it was mostly automated. Now I have a server, and I want to put it on my server, but I can't figure out for the life of me how to import it. I was able to install silverstripe and have a default theme (simple) running, but no matter what file I copy or change, it never loads my site. Does anyone has a tutorial on how this is achieved? server is with godaddy.

  2. When I started creating this site, it created a database with a random name, how can I rename that database? What are the files I need to update?

  3. How do I access phpmyadmin locally? localhost:port/phpmyadmin does not works.

È stato utile?

Soluzione 2

With regards to renaming your database, see the comments above as they are accurate.

However you still seem to be having problems getting your database out of your local environment, so let's concentrate on that first and see how you go with it.

Note that there are at least two ways you can back up/export your local database:

1). Using phpMyAdmin (Or other web-based DB utility) 2). Using the command line (see the 'mysqldump' command)

You asked about using phpMyAdmin to backup your SilverStripe database so I'll address only 1). above:

As this is specfic to your own development environment and you've not mentioned how far you've got in setting this up locally, nor any error messages you may have received, myself and others can only go so far in helping you out with this.

If you've setup phpMyAdmin as per the installation requirements, it should be installed by default and accessible at this address on your computer:

http://localhost:80/phpmyadmin

The following will also work, as port 80 is the default for most webservers:

http://localhost/phpmyadmin

If neither of these work and you receive a 404, 403 or 500 error (The screen in the browser should tell you which of these has occurred) I'm pretty confident you've not set it up correctly on your system. My suggestion is therefore to go back to the phpMyAdmin docs and re-check you've performed everything correctly as per your own environment setup (e.g. for Linux, OS X, Windows etc).

Once you're setup correctly, have a crack at the DB renaming suggestions above and coe back for more help if you need it.

Altri suggerimenti

1. Site deployment

Here is how I deploy a Silverstripe website to a live server.

  1. ftp into the server
  2. Upload all the files from the development folder to the server
  3. Create a database on the server
  4. Create a database user for the database and add all database privileges
  5. Update the live mysite/_config.php file with your live database username, password and database name
  6. Dump your local database
  7. Import your database dump into your live server database
  8. Call dev/build/?flush=all on your live server
  9. Check the website works
  10. Have a beer

2. Database renaming

The database settings are stored in mysite/_config.php. They should look something like this:

$databaseConfig = array(
    'type' => 'MySQLDatabase',
    'server' => 'localhost', 
    'username' => 'database_username', 
    'password' => 'database_password', 
    'database' => 'database_name'
);

To rename the database, rename your database in phpmyadmin. Then update your $databaseConfig database name in your mysite/_config.php file.

3. localhost phpmyadmin

Webmatrix does not come with phpmyadmin. You can download it, extract it to your webmatrix html root directory and use it. Or you can download an alternative like adminer, which is a one file database manager.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top