How can I backup wordpress? - wordpress

I have xampp and wordpress.
I've accidentally delete some files in the xampp directory, and xampp Apache was not working anyway.
I want to extract my posts and leave dealing with the issue for later.
How do I extract the files/posts?
EDIT: the wordpress and xampp are on my own computer.

Just log into phpMyAdmin (in xampp it should just be http://localhost/phpmyadmin) and export the wordpress database. You could then later import it into a new database and get a new installation of WordPress to access that, or else get the plain text posts out manually.

You can export all your content to a xml file (articles, pictures...) through the admin panel:
https://en.support.wordpress.com/export/
Once your new wordpress configured, you'll just have to import (Wordpress Importer plugin)

WordPress comes with a import/export functionalities already, here is a small animated gif on how to use it.
If your posts have images
it is also recommended to backup your uploads folder that its located in /wp-content/uploads, you can just zip it and save it somewhere.
Whenever you want to import your your posts again you can just unzip the folder inside the same /wp-content directory and replace old files with new ones if asked.
If you have A LOT of posts
I would also suggest to export the entire database using phpMyAdmin (xampp and also every shared hosting comes with it), here is a video on how to use phpMyAdmin to export your wp database

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

How to export a whole wordpress site including all the html css files?

I was wondering how I can export the whole template on WordPress. There is export under tools, but it only exports the database. I have edited the WordPress template and I would want to use this template for another website. How would I be able to do this?
I think its not enough to copy the theme folder to another WordPress because some themes needs some extra plugins to work Ex. theme builders etc.. and there may be database related configs
to clone a word press website
export the database using a tool like phpMyadmin
import database
copy whole WordPress website including all files (you can use filezilla ftp client for this or use hosting panel. there should be a file manager compress the all files and take)
find the wp-config file in the root and change the new db, usernames, password ..
you may need to login to the wordpress dashboard -- > settings --> general and change the wordpress base URL
it should work
With an FTP program you can download all the template files from /wp-content/themes/[YOUR TEMPLATE NAME]
There are different plugin for exporting Wordpress pages to HTML/CSS files.
One of them is "Export WP Page to Static HTML/CSS" from ReCorp

How to move Wordpress to another domain without the chance to make a proper backup first?

So my webhoster closed down, where I hosted my Wordpress blog. I was able to receive a zip file containing all my data. I now have a new webhoster and I extracted the zip file to its root directory.
Trying to open my website now gives me "Error establishing database connection". The web tells me it may be related to hardcoded urls in the Wordpress database, which I need to replace by the new url.
However the tutorials usually tell you to use the Wordpress interface to create a backup of my database first, which can then be edited in tools like phpmyadmin. I can not access the Wordpress interface anymore and so far did not manage to edit the database otherwise.
I tried placing a local copy of the blog in the "C:\xampp\htdocs" folder, hoping phpmyadmin would recognize the database and allow me to edit it. Not working, maybe I am doing something wrong?
Any ideas to revive my Wordpress blog?
Cheers
Okay I think I got it working. For people having the same issue:
I loaded the database locally by copying the *.myd, *.myi, *.frm files to a new folder in my local xampp installation (e.g. C:\xampp\mysql\data\myDatabase).
I then used phpmyadmin to export this database to a .sql file.
On my webserver I then installed a fresh wordpress blog. It might be enough to copy your existing wordpress stuff, without needing to do this step afterwards, not sure.
My webhost has phpmyadmin preinstalled, so I used that to delete the fresh wordpress databases and import the .sql file instead. Now everything is in place, but since I changed my domain I need to change the URL paths in the database.
I used this script (use it by placing it on your webserver in the wordpress root folder and calling it in the browser) to do a search&replace of my old url to the new url: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
After that I only had to manually fix the path to my header image that I had edited in the past in the theme's header.php file.
Phew. Thanks for your help f00644.

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

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

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.

Resources