I develop a laravel site in localhost. I'm very interested in the best way to migrate database to production site without losing current data.
If you are using phpmyadmin you can just export the database. It will create a .sql file. Then you need to go into the phpmyadmin of your server and import this .sql file.
You can just save local database with mysqldump to file on the localhost and restore it from dump on the remote one, using ssh (by mysql host database < dump.sql) or phpmyadmin kind of tool.
Backup your database and storage;
Use a git repository- BitBucket or GitHub;
Any more information on your production server? Development Server?
Example: XAMPP, WAMP, or other local server
Are you going to use LAMP?
Related
I have installed Prestashop 1.7 with MariaDB, in local system it is working fine. I have developed 4 different pages. I want to move this pages to hosting server? Do i need to install the same Prestashop version in the hosting server or just copy and paste will work?. I developed in Ubuntu 16.04 system. Do i need do some changes in db developed in local system while moving to hosting server?
You should simply follow this process:
Transfer your files through FTP to your hosting server
Transfer your database through phpMyAdmin to your hosting server (make use to use utf8_general_ci as a charset)
Upon transfer completion, edit /config/settings.inc.php to set the right MySQL password (the one provided by your hosting provider)
In your PrestaShop admin-panel, configure your main shop URL as well as if you want to use SSL (recommended) or not
Voilà!
After all setting Also You need to Change in ps_configuration table of DB.
In the name column, find the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL row In the value column and write new domain name that you want PrestaShop to use.
i am creating a laravel application and want to host windows PC with data synchronization on my live host cpanel. It is possible or not? if yes, how can i do synchronization my local Xampp project phpmyadmin database in my cpanel phpmyadmin database. Xampp is compatible for large amount of data or not?
Give the local database to live database synchronization idea.
You can export your database from your xampp control panel and import it in your phpmyadmin of cpanel
i want to share my Laravel(version 5.4.12) project with client, but i didn't use BitBucket before and i have no idea how to upload my Local project on Bitbucket with Database and how to access. My client want to update him daily.. so please help me out
Just create a new repo on bitbucket, then select the option that reads
I have an existing project
They will give you all instructions how to upload existing project to bitbucket.
You cannot upload your local database to bitbucket by default, unless you manually download it and place it somewhere in your project, then on your next push, it will be uploaded.
But your project already goes online with all migrations. So you can use migration on the server to install the database.
How to link with website
Once on bitbucket, your code is now available online. Then you need to connect on your server on ssh. Once connected, you can navigate where you want to install it and clone the repo.
after cloning the repo on the server when you want to link the website, you can run usual commands like php artisan migrate --seed to create and populate the database.
Make sure you create .env file online. It won't be available on bitbucket.
You can use ngrok to expose your locally hosted project over secure tunnels to the public internet even if your local host is behind NATs and firewalls . It is very easy to use, for example after you have downloaded ngrok, by running ngrok http 8000 from the command line and it will give you a URL which will expose what is normally localhost:8000 for you. Give that URL to your client and they will be able to access your localhost.
You can find ngrok here - https://ngrok.com
You can only show the progress to the client if you have deployed the project on a server or if the client can pull from bitbucket and run on their own localhost but am assuming you are not going that way so upload it on a test server.
I've just started with Laravel, installed on WAMP server, and when trying to migrate the first tables, I get and error saying that homeasted#localhost user has no premission, but I dont know how to change it to work on my virtual machine. What should I do?
Please check out Laravels Homestead – it is easy to setup and provides you with a webserver, ready to use and pre-configured for Laravel.
But if you want to use WAMP, you have to:
1) Create a database for your new Laravel installation. Go to your local phpmyadmin, which comes pre-installed with WAMP Server. Login to your database (default username should be 'root', password is blank). There you can manage your databases. Go ahead and create one for your Laravel installation. (There are many tutorials about how to create a database with phpmyadmin)
2) Go to the root directory of your Laravel installation. Open the file called .env.example and fill in your database settings. Then save it to .env. This should get your database connection up and running. Read more about .env in the laravel docs.
If you're using Homestead, you do not need WAMP server. To run migrate command, you need to run vagrant up to start the VM box and then run vagrant ssh command to run SSH. Only after that you should run php artisan migrate command.
Please check here i think that can help you.
https://laracasts.com/discuss/channels/general-discussion/homestead-db-connection-problem
well you can change the table name in .env file which is present in the root directory
If it is not present in there (as it is not available in laravel 5.2) please download it.
Enjoy
I am having a hard time running my Magento site website locally using xampp. I have downloaded everything in the public_html to the htdocs folder. It is giving me a n error when i load
SQLSTATE[HY000] [1045] Access denied for user 'mySite_magstore'#'localhost' (using password: YES)
I loaded up the phpmyadmin panel to check the password but it is not loading the one from my website but the new one i have locally. I'm sure I am missing a step here as well.
All the information I have found online is regarding setting up a new site on xampp but could not find anything about using an existing one. Any help or links would help.
Thanks!
If you want to create a test environment in your machine, try the following steps:
Export your live DB
Import it in your local machine
Go in to the core_config_data table and change the 'value' of:
web/unsecure/base_url
And:
web/secure/base_url
To:
http://127.0.0.1/
Go in to:
app/etc/local.xml
And change the username and password to the correct ones
Edit:
Thanks to Cooper Maruyana for bringining this up:
If the previous step doesn't help delete everything in the 'var' folder.
Check your app\etc\local.xml for below line
<password><![CDATA[]]></password>
I am sure you have set some password for production server, but on your local you don't have any password for your root user. So you need to remove that password and also set you base URL in core_config table.
There are two possible options: one is to copy your database from your server to your localhost as pzirkind has illustrated in his answer.
The second option in case you want to use exactly the same database, i.e. you WANT to use your live database:
You need to adjust your app/etc/local.xml file to point to the database server IP address. Currently there should be "localhost" in there. Remove that and put the database server IP address. If you have setup the user on the database to allow remote access (% for scope in phpmyadmin), then this would work, too.
However, I would not recommend this option. I only use it sometimes to share a database between development and staging areas, but never for live sites.
Therefore, I would highly recommend pzirkind's approach!