Copy wordpress site to local server (xampp) - php

I'm having a problem, because I have to copy a live wordpress site to my local server (xampp). But the site php version is out of date and the phpmyadmin database too, so I can not import the database. And if I upgrade the php version, the site can no longer be reached. What is a good way to copy the site to the local server.
Can somebody help me out?

You can try to dump the database with mysql command line interface using ssh from the server. Then try to import the database in local phpmyadmin with SQL compatibility mode as MYSQL40. It may work.

Related

How to send Mysql changes from local server to online live server

I have created a web app locally in WAMP with PHP and a MySQL database. I am about to launch a demo online on a Linode server.
My question is once I have got it live on LINODE and I want to add a new Mysql table locally on WAMP how do i push the MYSQL changes to the live version online. I am not sure what this is called and how to do it. if anyone can share ideas/videos that would be awesome
I would suggest using a MySQL Replica, in which the replicated database will only be read from.
That or you can create some type of CI/CD pipeline which will run the same queries on your local as the remote, but that's a bit more complex.

Moving MySQL database from local MAMP server to host's server

I've developed WP site locally using MAMP. I know how to transfer WP site to server using FTP but problem is how I get MySQL DB to server. Before I've done this in cPanel and that's easy. Now there's no option to use cPanel or phpMyAdmin on the host. I can get connection to server with FTP and SHH. So is it possible to move DB from MAMP to server somehow? If not what should I do?
Thanks in advance!
You could FTP the export of your SQL dump file to your live server, then if you have SSH access and can connect to the MySQL command line, you could import your SQL dump file. This article should be helpful:
https://stackoverflow.com/questions/17666249/how-do-i-import-an-sql-file-using-the-command-line-in-mysql
You didn't specify what type of live server you're running, that information would be helpful!

Issue with XAMPP and MySql

I am facing a problem pretty common, I have installed MySql Server because in the past I developed an CRUD app by using Java Swing and Maven, and now I am trying to create same thing, a CRUD app only this time with PHP.
I am following a tutorial from Udemy and this guy is using XAMPP to launch both an Apache Server and a MySQL. But somehow it's interfering with the one already installed on my laptop and cannot make the connection with XAMPP.
I opened my.ini and where says password i put my own from MySQL Workbench, and I see it's using the same port 3306 but still cannot work and I dont know why.
Is there any solution to modify my.ini and establish the connection without uninstalling the MySql Server installed before, because if I do that I ruin the other Java app using it.
Could you please provide the error logs? So the problem can be identified properly. By default, you can get the logs file for Apache in
\xampp\apache\logs\error.log
And for PHP here \xampp\php\logs

Drupal on Localhost (MAMP)

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/

IIS php Mysql - databse insert value work on XAMPP & WAMP but does not work on IIS

I have my Windows 7 desktop computer, and created php application which uses mysql database. I tried to run that after creating environment in my desktop with the help of XAMPP. It worked perfectly without any problem. I tested that same application in WAMP and it worked perfectly there also.
However, at the time of deployment to the Windows R2 2008 server, I used IIS to get the application run. Following is the description of firmware installed:
Installed mysql and mysql workbench
Installed IIS using Control panel-> add remove program-> turn on windows feature on off -> iis
Installed php 5.3 version using Microsoft Web platform installer (Web PI).
Activated FastCGI with the help of following link: on-iis#InstallPHP
Updated necessary changed in php.ini file. Activated port 3306 for mysql and port 80 for localhost.
Checked localhost and phpinfo.php file and both work fine.
Deployed application, and tried to run using localhost and 127.0.0.1 as well as from local IP address and it executed the first login page perfectly.
Everything works perfectly. However, I open the entry form in the application, and tried to fill up the form, and when clicked on submit, the data are not getting saved in database.
As a test, I checked by importing the old database and while searching the data in other application page, I am able to see the data coming from the database. But problem only happens when I do any insert any entry or try to submit data, I can't get the data saved in database.
This same thing works perfectly in WAMP and XAMPP however, does not work on IIS environment.
The MySQL user being used to interact with the database may not have the INSERT Grant for that database. WAMP and XAMPP are both using a mysql user with defined privileges. Have you created the same user with the same privileges on the newly created MySQL instance on your Windows 2008 server? You may consider reading over the MySQL Grant syntax. Utilizing mysql_error() for error trapping could prove useful for troubleshooting as well.

Categories