Restoring wordpress site using .zip and .sql onto AWS - mysql

What is the best was to restore a website from a backup when all I have is a .zip file and a .sql file of the wordpress site migrating onto aws. So far I tried installing wordpress with a EC2 instance of wordpress and I was going to try and restore from the dashboard using a wordpress plugin. But no plugin I found can upload a .sql database like I thought. Which doesn't make much sense now that I really think about it. I am unsure if should I install a Microsoft SQL Server DB Instance in RDS or MySyl for the wordpress install? Please help so confused...

You can use that method:
Extract the wp-content folder and upload it.
Log onto your ec2 and use the mysql command line to import the database.
Update the siteurl and home in wp_options.

Related

Database mysql process overloading after cloning

I clone my Wordpress site. I hosted them both in shared hosting. But now my new website always make overloading the sharedhosting server due to database mysql process.
Here are some screenshots:
https://prnt.sc/26lotyb
https://prnt.sc/26loucm
This is what I did to clone my site:
Export database from phpmyadmin
Compress and download files in public_html
Upload, extract files in public_html, import database, connect them.
Run SQL command to replace domain name
Use the plugin Better Search Replace to replace needed things.

How to put MySQL database in project folder

I'm using Node.JS express and MySQL. Also I have XAMPP installed. Database is in folder C:\xampp\mysql\data\users now, but I want It to be in C:\...my-project\users so I can push it to github and other people could get it with all the other files. How can I move it to another folder and continue working with it on localhost?
Best way is to mysqldump your database.
Then you can mysqlimport your .sql file or simply execute in a sql query.
Also, working on plaintext sql template allows you to use version control.

WordPress Error establishing a database connection (xampp)

I am using xampp to host my website local. I am making a WordPress site with the MySQL database from xampp.
Now, I bought a new computer and took backup of my WordPress folder. Now when I try to open my WordPress site on my new computer, I get the error: Error establishing a database connection
I can image this is because the database that is linked to the WordPress site is not on my new system.
I formatted my old drive so I cannot restore the old database. Is there a work around?
If you have your old database file (.sql) then you can just
Run this link from your browser http://localhost/phpmyadmin.
Select Database which you want to upload the SQL file. (If no DB , create new database).
Click on Import option from top menu section and upload you files.
and for taking backup of your database on Xampp
1. Run this link from your browser http://localhost/phpmyadmin.
2. Select Database which you want to take backup of.
3. Click on Export option from top menu section and backup your files.
If your old drive is completely formatted, and you weren't using any sort of Wordpress backup plugin, then no, you won't be able to rebuild the site. Sorry! As well as storing your content (posts / articles), your Wordpress database also stores information on which plugins you were using, so it is an critical part of rebuilding any Wordpress site.
Next time around, you should export your database to a file (eg .sql), so you can import it on your new server/laptop. You would achieve this by either using a Wordpress plugin, or on XAMPP by using phpMyAdmin. You could also do this with 3rd party apps, like SequelPro or MySQLWorkbench.
You should have your images and static assets saved - eg css files, uploaded images, so you have something to start with, if you decide to rebuild your site without the database.
You need to install your wordpress site again with new database. You already lost it. Always backup your wordpress site.
You can backup your wordpress site with this plugin and it's free-
https://wordpress.org/plugins/updraftplus/
Thanks
BanyanTheme
Step 1: Backup your database on the old computer.
Step 2: Restore the database onto the new computer.
Step 3: Run file install in wordpress
Good luck!

Project backup along with database to removable drive

I am developing with netbeans.
I am using MySql database.
I want to move my project on my another laptop.
But when i copy my project to removable drive i don't get database files with project.
Please tell me how to move whole project along with database files.
I am copying from hard disk, is that a problem???
You could use the export function from the open-source program "MySQL Workbench" and then import it on your laptop.
MySQL Workbench: http://www.mysql.com/products/workbench/
And how to use MySQL Workbench to export & import:
https://www.beastnode.com/portal/knowledgebase/48/MySQL-Workbench-Backup-and-Import-your-MySQL-Database.html

WordPress Database Backup Question

I am working on a charity site and was tasked with moving a WordPress site to another host from Yahoo hosting. I have done this before and thought it would be easy enough.
Before moving the site I backed up all the files and backed up the database. The files are fine, but the database backup has me stumped.
I ended up with the following file: mysqldata.2009-09-20-18-37.tar.gz
I thought I was in good shape and could just import the file using PHPmyAdmin, however, when I unzipped the file it is not a sql file at all but has the following structure:
blog
mysql
Within the mysql director it has a list of files like this:
user.MYI
columns_priv.frm
columns_priv.MYD
columns_priv.MYI
db.frm
db.MYD
db.MYI
func.frm
func.MYD
func.MYI
host.frm
host.MYD
host.MYI
tables_priv.frm
tables_priv.MYD
tables_priv.MYI
user.frm
user.MYD
Is there some way I can restore the database with the information in this form?
Thanks!
On your new database server, create the new database, e.g. CREATE DATABASE my_wordpress_blog
Copy these .MYI, .MYD and .frm files to wherever MySQL stores the files for this database, e.g. /var/lib/mysql/my_wordpress_blog/
This will probably only work if the version of MySQL on your new server is the same or newer than your old server.
Hy if you have shell acces to the server just do
`mysqldump db_name backup-file.sql`
And restore the db in phpmyadmin.
Might also consider using the WordPress Tools->Export at the old blog and Tools->Import->WordPress at the new blog.
Or installing a plugin that will create a backup you can restore from within phpMyAdmin.
http://wordpress.org/extend/plugins/wp-db-backup/