How to back up wordpress site to be restored after a clean installation - wordpress

My Wordpress blog appears to have been hacked and now blogs do not save and any changes I make such as approving a comment do not have effect. I am trying to backup my website so as to uninstall wordpress and perform a clean re-instillation. I want to create a backup so that when i restore the website will appear with everything the same as before: posts, images, links, colors, comments, themes, pages, etc. I have already backed up the MySQL database successfully. How do i backup the rest of the site.
Please tell me how to backup the site and also how to restore the site.
Thanks

You need to backup both your database and your Wordpress installation. The main resource to use for this is the Wordpress site:
http://codex.wordpress.org/WordPress_Backups
If you have phpmyadmin installed you can do a database dump from ther. If you don't have this installed then use mysqldump.
Wordpress installation backup can be initiated through the following URL:
http://[yourwordpressurl]/wp-admin/export.php
That will contain "your posts, pages, comments, custom fields, categories, and tags".

These links should get you started:
http://www.geeksaresexy.net/2008/01/29/how-to-backup-and-restore-your-wordpress-blog/
http://www.siteground.com/tutorials/wordpress/wordpress_backup.htm
http://codex.wordpress.org/WordPress_Backups

Good idea to look at FAQ: My site was hacked « WordPress Codex and How to Completely Clean a Hacked Wordpress Install.

best thing to do is to manually copy the database, as wordpress restore has an upload limit on the built in restore function. so if you've been blogging for a while, this can be really bad.
mysqldump -u yourUsername -p yourDatabaseName > databaseName.sql
will create the file databaseName.sql this is a full clone of all your database info (all your posts & wordpress configs)
then you can restore later with
mysql -u yourUsername -p yourDatabaseName < databaseName.sql

I figured it out. One way to cleanly install a new version of Wordpress but not lose your website is the use the Wordpress export feature as mentioned by Jon.
http://codex.wordpress.org/Tools_Export_SubPanel
This exports your blog to an XML file that contains all content of your site: posts, comments, authors, pages, etc. However, images do not go with. However when importing this XML file there is an option to download and import the attachments automatically which can be done if the original site is still online. So what I did is export my XML file, upload it to a wordpress blog installed on a subdomain automatically getting the attachments, then export an XML file from the subdomain to import into the actual wordpress site. This way my attachments were simply moved around from site to subdomain back to site. This made it easy because I did not have to handle backing up my attachments manually.
So what I did was back up my theme, export my blog to XML, then delete wordpress and my database then reinstall it with a new database on both my site and a subdomain of my site.
Then I imported my XML file and put my theme in the themes folder of the subdomain. Then I exported an XML file of this subdomain copy of my site and imported it into my real site. This made my blog have all the content correct and the theme right but none of the links, plugins, or colors correct. I then had to customize wordpress through the panel to get it back to the look and feel it was. For this It was lucky I had a stored copy of the site to refer to.
This process was long because I actually had to rebuild my site twice, one for the subdomain and then again for the actual thing. But it fixed my problems.

You can simply use EverLive.net. No need to install any plugin. No need for shell access. With this service you can simply make your wordpress website backup to the cloud. One-click restore option is also available wheneven you need to restore.

Related

Moving Wordpress Site from one Cpanel Account to Another

I can't find an answer to this particular question.
I have two cpanel accounts and I want to move my wordpress webiste from the original cpanel account to the new cpanel account.
I've tried downloading all the wordpress files and that didn't work. I've tried downloading all the files from the original site via WinSCP and that didn't work either.
I have been learning about and using various languages to create websites, etc. But I only know enough to be dangerous. So. The best answer would be one that's very literal to what steps I need to take using basic, regular-person English.
I hope someone can help!
Wordpress sites operate through a database so you can't simply copy files from one cPanel to another. There are a few different ways.
Method 1: Use a plugin
Create a fresh Wordpress on your new cPanel then use a migration plugin such as https://wordpress.org/plugins/duplicator/
Method 2: Do it manually
This is more complicated but I find it more reliable. The steps are as follows:
Download your Wordpress files
Use phpMyAdmin on your cPanel to export your wordpress database (SQL export) - https://www.hostinger.com/tutorials/export-mysql-database-with-phpmyadmin
If you are changing domains then you need to use a text editor on your SQL export to find and replace any instance of your old domain to your new one
Export your theme options (f you have them). There should be a theme option that says import/export and a long string to copy
Now you're ready to import
Upload your wordpress files to your new cPanel
Import your database in phpMyAdmin
Go to the home folder of your Wordpress install and edit the wp-config.php files to include your new database details (username, password, database name)
Login to Wordpress and import your theme options by copying the long string from point 4 into the import box (if you have options)
You should be done
Before doing any kind of migration make sure you have a back-up of your Wordpress site

wordpress database not showing in PhpMyAdmin

I am new to wordpress and have bought udesign theme from themeforest. from my Plesk I have installed WP and then from the dashboard of WP tried to upload the theme, but failed. hence went directly to dedicated server and hosted on the root folder.
Theme started reflecting on the dashboard and I have started customization. Once site completes I need to move the site to production server. When I check PhpMyAdmin from the plesk, it shows there is no DB table. how do I copy/move the site without DB?
Can i manage site without PhpMyAdmin? like copying the entire assets to new server and it starts working automatically?
Please help me to find DB or Let me know how to work with the themes to make sure everything in right place.
Many Thanks,
Gururaj
If you’ve ever had the need to find the name of your WordPress database, then there’s an easy way to do that – simply look for it in your wp-config.php file located in the root folder of your WordPress install.
Accessing Your WP-Config.php File
If you are doing something where you need the name of your database, then I’m assuming you have access to your server.
Simply go to the main folder of your WordPress install and locate the file called wp-config.php.
Edit file and find name in:
define('db_name','your database here');

how to export wordpress pages,posts with media for another site

I have wordpress site i need to export posts , pages with media and attachments engaged with them.
and need to use it in another wordpress site.
Also i have installed the woocommerce in it , i need to export the store settings, products, categories , tags with images used for it...
There are many custom post types used in my site. i need to also export theme with medias used...
I tried using Tools -> Import / Export but that does not exports the data with media or images.
Need an immediate help..
Thanks
I just found out how to do this today, and answered this question with a great guide with photos on how to use the export and import tools in WordPress to transfer photos to a new site to be used in posts and pages. This is done by editing the xml files to show the correctly transferred image URLs.
Since I can't post photos because of my reputation, here is the link.
https://wordpress.stackexchange.com/questions/117344/failed-to-import-media/372304#372304
I have wordpress site i need to export posts , pages with media and attachments engaged with them. and need to use it in another wordpress site.
Also i have installed the woocommerce in it , i need to export the store settings, products, categories , tags with images used for it...
There are many custom post types used in my site. i need to also export theme with medias used...
I don't think so you had left something un-neccessary, So Download the database and import it wherever your new database you want to store.
Then download the wp-content/themes, wp-content/uploads, wp-content/plugins Directories. OR Simply Download your wp-content directory. Now you have everything.
I have Everything Now?
Now download the wordpress from wordpress.org and install it to your server. After complete the Installation, Replace the wp-content directory with your new installed wordpress. We assigned our old stuff to New Wordpress.
Now its time to replace Database. There are several online tutorials to replace your old database to new one.
There are multiple ways you can do this:
Manual
Using plugin
For manual, it's a little more lengthy process, you need to download complete files from one server and upload it to another. Do some changes to the backup DB i.e replacing urls and then uploading the DB file as well.
Other way, which is far more better is to use the plugin called as "All in one Migration". Here is the link which can guide you on the complete process:
https://makersbyte.com/easily-export-import-wordpress-sites/
Exporting your WordPress site can be used for site moves or simple backups. In this guide, I’ll provide some simple and easy options to export your WordPress sites for both non-technical and technical people.
Exporting your site creates a backup of your site, usually in the form of a .tar.gz or .zip file, which you can then use to restore or migrate your site to another domain or host. Once you have the backup it’s an easy matter loading a blank WordPress site, loading the plugin, and then restoring the site from your backup file.
When you export your WordPress sites you have the choice to export all your posts, pages, comments, custom fields, terms, navigation menus, and custom posts but the downside to this approach and it’s that WordPress doesn’t export plugins, theme, and settings of your site.
Export Site
1. Log into WordPress
2. Go to Tools > Export
3. Choose what you want to export:
-All
-Posts
-Pages
-Media
4. Click Download Export File. This will download a .xml file to your computer.
Import Site
1. Log in to the WordPress site you want to import it to.
2. Go to Tools > Import.
3. Find the option called WordPress at the bottom and click Install
Now.
4. When it’s finished installing, click Run Importer.
5. Upload the .xml file you exported.
Once you’ve completed exporting your site, you will want to test everything on the site. Make sure that you look for dead links, check menus, and any functionality or post that you consider important to your website.
It doesn’t have to be hard to export your WordPress sites. There are options for everyone, no matter what level of technical skill you have. And should you ever encounter a conflict, hack, or choose to move your site, having an export of your site is invaluable.

How to install WordPress in subdomain?

At the moment I have a WordPress installation in a subfolder of my current site (example.com/wordpress). How do I make it so that wordpress is accessible from a subdomain?
I.e. I would like wordpress to be accessible from this address: wordpress.example.com, and that all the links, posts and pages will still work flawlessly, e.g. wordpress.example.com/my-wp-post/
If it makes a difference which host one is with, I am asking specifically about 1&1.
Thank you
I am not a big fan of video tutorials, but I used this one to successfully set up a new subdomain and install wordpress.
Here is an overview of the process
Use cpanel to create the subdomain
Download the latest version of wordpress to your local drive
Upload to subdomain folder on your host
Extract the files, and move them into the subdomain folder
Use cpanel SQL Wizard to create a new data base
Make a note of the username, db name and db password
Copy wp-config-sample.php to wp-config.php in the subdomain folder
Edit wp-config.php to add the username, db name and db password
Open the URL "your-subdomain.your-domain.com/wp-admin/install.php"
Fill out the fields on the form and press "install wordpress"
After creating the a subdomain I use WP clone to create and install a backup of my live site into the new subdomain. The clone site allows me to verify updates before deploying them my public site.
Hopefully the OP has resolved this issue, but maybe this will be of use to others.
I think you have 2 options.
1) Manually:
Copy your wordpress install from the subfolder of your main domain to the subdomain's folder. Using a database editing tool (of your choice) go into the wp_options table and change the option_value of the option_name 'siteurl' and 'home'.
You might have a few other options that will need editing, but they are more often than not plugin specific.
2) A little better:
Create a new wordpress install in your subdomain. Copy your plugins, themes and uploads into it. Then, install the plugin wp-migrate-db-pro from https://deliciousbrains.com/wp-migrate-db-pro/ Use this plugin to copy the database from the subfolder install to the subdomain install. This plugin will globally search and replace the URLs and Folders for you.
I've been using this plugin for a while...and it saves me hours and hours of work.
Purchase your unique URL or subdomain or wherever you want the wordpress to live from your host provider.
wordpress.example.com
coolurl.cooltimes.com
upload Wordpress to that root. /
Or define a custom folder for it;
wordpress.example.com/partywp/
NOTE: If your looking for the free (no hosting required - though less custom website friendly) wordpress with similar URL, please use wordpress.com version and you don't need to do anything.
http://wordpress.com/ is different from http://wordpress.org/
Wordpress.com is like google blogger and you simply create an account and they give you a URL - and free blogging area with small templates. You can transfer your free wordpress.com to custom wordpress.org -- if you would like to use wordpress hosting naming convention, consult wordpress.
Added:
If you are changing the location from your original install; to a different path or location. You should then uninstall the Wordpress that is elsewhere or previous, and reinstall at where you want it to currently live to avoid any wholes or errors, etc.
So, if now it must be at: wordpress.example.com -- work with your host provider (hopefully not godaddy) locate the root to this domain, and reinstall with a fresh latest version and you should be OK. If you have further DNS issues, please try to describe your question more clearly.

Wordpress pages won't load after hosting transfer

I've just transfered a wordpress website to another domain.
For the transfer I've made the following steps:
Copied db and changed domainnames (http://olddomain.com to http://newdomain.com)
Imported db on new host (via phpMyadmin)
Changed wp-config to match new db settings
uploaded all wp files
So the homepage works, but I can't visit the other pages. However, they are showing up in my admin page.
The way I've done this in the past and have worked for me:
1- Export db from phpMyAdmin, then replace in the .sql file all references to old domain.
2- Imported db on new host (via phpMyadmin)
3- Changed wp-config to match new db settings
4- Uploaded all wp files
5- Regenerate .htaccess file, if you are using permalinks.
(you can do this the way #Riboflavin suggests)
Also, here you can find some additional information that could help:
http://codex.wordpress.org/Changing_The_Site_URL
If you are using permalinks you will need to regenrate them after the transfer. Go to Settings → Permalinks in your admin panel and choose the permalink option you would like to use and click Save Changes. This will regenerate the permalink portion of your .htaccess file for your new domain.
Are the links to those other pages still pointing to the old domain?
If so, you could try the Velvet Blues Update URLs plugin to update all the links in your site.
I've used this successfully in the past, but recommend that you back up your data fully before trying it yourself.
The fastest transfer from my experience is through cpanel using fantastico or something that installs wordpress quickly. The process is as following:
Install wordpress on new hosting through fantastico or similar app
Delete everything in installed directory except for wp-config
Copy everything from old wordpress data, except for wp-config
Paste/transfer all that data to the new host
Now export old database and delete tables on the new one then import from old db
Change site URL within database to new one
Using fantastico helps in setting up databases quickly and wp-config. No need to do it manually and waste time. Just make sure to leave the installed one and not transfer the old one.
The whole process takes me like 2-3 minutes, I think its the fastest once you get it.
You need just to adjust your new .htaccess by regenerating it
go to WordPress dashboard
Settings > permalinks
then save modifications
if it's work then well done else you need to manually change it :
you will find the .htaccess content after saving modification in permalinks page copy the contents and create the .htaccess file in the root directory

Resources