I am working on a website for a client and I need to download a Drupal site and run it on localhost (MAMP).
The website is hosted here and I have FTP access
https://cloud.digitalocean.com/
I downloaded all the files from the FTP and pasted it in my "htdocs" but it's either a blank Drupal page or I get database access errors. I'm guessing I need to download a SQL database from the website, but how can I do this?
To summarize this, you can export database in many ways:
Backup & Migrate module, as ssnobody suggested.
If you have shell access you can export database with shell command:
https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-and-reset-a-root-password-in-mysql
phpMyAdmin (find one in Control panel or install one on your own), as Chandu suggested
http://docs.phpmyadmin.net/en/latest/setup.html
Use Drush.
I ordered it from easier to hardest....so try #1 first....
you can open the cpanel of this website, open the phpmyadmin and export the database to an sql file, and import this file locally.
access the control panel here
https://www.digitalocean.com/features/control-panel/
Related
I have access to server of our company's website. I access it using Putty.
I want to download all files(index.php, any jpg files for favicons, etc.) used for deployment of the web project. When I told to programmer of website to share the full script(HTML,CSS,PHP, jquery plugins), he said that I can access the entire code from server.
When I enter the server via Putty(private key+ssh), and then I type "ls" I see that there are "index.php" and "mysql" files, the full contents of which I cannot download.
What are the useful resources for list of commands?
Which command should I use to download the project folder containing all files with code and without code?
P.S. I do not know if this information is necessary, but the website was deployed using DigitalOcean.
As you are using Putty, I'll assume you are working on Windows. There is a GUI tool called WinSCP that works similar to Putty (i.e. over SSH and uses private keys and stuff) and can be used to access the remote server's filesystem. It has a pretty simple to understand UI which will be divided into you local filesystem and the server filesystem. Once you're connected and have reached the files you need you can just drag and drop the files into your local filesystem side.
If you would like to explore some command line options, its basically any tool that does scp. I think Putty comes with scp or pscp installed already. You can check by just typing in the command in your cmd/powershell.
You can download pscp.exe from PuTTY website and then:
Open cmd.exe and type:
pscp your_username_here#yourcompany.com:/path/to/file C:\Path\To\The\New File
I uploaded a php script to a subdomain that I own, for testing and customizing purposes before it goes live (I had planned on moving everything over to the root domain when done).
Someone then suggested that I work on in Xampp instead as it is all locally installed and therefore much faster, etc.
Thing is, I had already customized the script a lot (mostly CSS but also uploaded graphics via the admin panel, etc) while it was up live on the web host, so I would like to run a copy of the most up-to-date version of it in Xampp and continue customizing it from there.
I downloaded a copy of all my files by FTP into htdocs > Test folder. I also downloaded a copy of the database via phpmyadmin and imported it via phpmyadmin into my localhost.
The big problem I have is when I try to access the scritp via localhost, the url immediately reverts back to the live url. How do I set it to link to the local host copy instead?
Thanks.
Based on AbraCadaver's suggestion, I found the answer lied in changing the URL parameters in config.php
Thanks
I couldn't trace the issue while migrating.
I am using XAMPP server in local machine and I have tried to export live site and then import it by "all in one wp migration" plugin but I got "theme not found" error when I visit my site locally. the website is working perfectly on the server.
I have performed the following steps:
export and download site from the server's wp-admin panel.
install and activate "all in one wp migration" in my localhost wp-admin.
import the downloaded site in my localhost.
now it prompts "successfully imported" and have the link for setup permalinks.
when I click on it I found internal server error.
I would suggest to perform a manual migration which is done in few easy steps:
1) Archive the folder of your website from your hosting account;
2) Go to the phpMyAdmin and export the database connected with the Wordpress (which you can see by inspecting the wp-config.php file, where you can find the database username / database name and password);
The next step is to download both of the 'backups' of your website (the archive and database export) then simply extract the archive in your xampp section where it is loading and then create a database on your local phpMyAdmin where you can import the one from your hosting account. By following those steps you should have successfully migrated the database and website files as they need to be without relaying on a plugin that could (and will) mess things up. If you encounter any issues afterwards as mentioned in the previous replies enable the debugging from the wp-config.php file and enable the 'Display Errors' from your PHP.ini of your XAMPP.
Also make sure that the php version that you are running on XAMPP is the same as the one of your host, to make sure that there aren't any issues such as plugins requiring higher version or lower one.
Hope this helps.
use All-in-One WP Migration Wordpress
I created a database project using PHPRunner to show data from a MySQL table in GridView. This project is saved in 'C:\xampp\htdocs\Project1\output'. When we run PHPRunner, this project runs on a XAMPP server in preview mode, but when we close the PHPRunner application, the project stops running in the XAMPP server.
How can we use this project code on my another website, so that the project can stay running? How would we use/embed this project into the site?
PHPrunner uses inbuilt server to preview your generated application. So quite obvious when you close Runner it will close the inbuilt server connection as well. You will have to move the output folder to root folder of your web server. If you look inside your project folder, you will find a folder named output, move this folder to the root folder of your web server, it should work fine.
Make sure your web server is powered to use PHP and other drivers related to your project.
If this is what you have
C:\xampp\htdocs\Project1\output
Then, copy the C:\xampp\htdocs\Project1**output** output folder to httdocs so it's like C:\xampp\htdocs\output it should work fine.
Check the url: it should be something like: http://localhost/project1/output. This when u run it with xamp. But when u open phptunner then it's server run it with different address
I'm having trouble migrating a Wordpress site I've been working on from my local machine onto a host.
I've been through the documentation and as far as I understand, I have to:
Export the wordpress database from my local server.
Edit the wp-config.php file to suit my target server.
Change the URL's in the settings to suit my target server.
Import the database on my target server and move over the adjusted wordpress installation onto my target server.
I can do all of this, but my there seem to be some problems: in my hosts phpmyadmin I can't view or edit any users and neither can I create any databases (there's no option for it). When I try to import a database I get an error: #1046 - No database selected.
What do I not know/doing wrong?
If importing a database, you need to create one first with the same name, then select it and then IMPORT the existing database to it.
I can do all of this, but my there seem to be some problems: in my hosts phpmyadmin I can't view or edit any users and neither can I
create any databases (there's no option for it).
If you're going through CPanel, you won't be able to add a database directly through PHPMyadmin. You should go to your host's home page and look for some wizard to create a database. (it should be next to the PHPMyadmin link.
Alternatively, for moving wordpress, You can install wordpress on your live site, then export your localhost content via Wordpress's dashboard and then import it on the live site.
This article on Moving Wordpress will also be helpful.