Need help to live WordPress website without database - wordpress

I have downloaded all files & folders from c-panel root directory but somehow I have deleted/lost the database from my end. So is there any way to get all content from my backup or am I able to live back my website without the database as well?

No, It is not possible to run WordPress without the database.
What's more:
The only database supported by WordPress is MySQL version 5.0.15 or greater, or any version of MariaDB.
Why it is not possible?
Because as You can read in WordPress Documentation, It is using the database
for storing and retrieving the content of your blog, such as posts, comments, and so on.
https://codex.wordpress.org/Database_Description
Basing on that you downloaded files I think You will be able to restore only parts of your website on new installation.

Related

Can uploading public_html folder to another hosting service provider not be enough if the database wasn't backed up?

I had downloaded the whole public_html folder of wordpress of my website before moving to a new hosting provider. Meanwhile the old hosting is no longer available now. I was not aware that for the database one needs separate backup.
So does it mean that I can not have the full old website back if I only backedup the public_html folder?
Also can I still get something useful out of the public_html folder by uploading it to the new hosting or do I have to have a full start from scratch?
Wordpress stores all the text of your posts in the database, which also includes metadata about theme and plugin settings, etc. Theme files, plugin files, post images and other uploaded files are stored in the wp-content folder so you are good. You should backup your database before you migrate.
That said, you might be able to retrieve the text from the Internet Archive (https://archive.org/) if you are lucky. But that means you have to somehow manually get the posts back to the new database.
All your WordPress pages are stored in the database. If your database is gone or absent, I recommend you start all over. In your current situation, you can recover your theme.
It is also possible that the theme does not function properly if some of its setting where registered in the database.

How do I keep WP db content synchronized in the filesystem?

I'm looking for an easy way to sync content that is in the Wordpress DB with the file system. Pages and Posts mostly, but any additional content would be great. I'm not looking to cover 100% of the DB content, just the most used configurations.
This is the Wordpress workflow I'm looking for:
Create a file in the filesystem, ie. /repo/posts/mypost.yml
Run a Wordpress command-line, ie. wp sync, which checks for sync status between my filesystem /repo/ and the content in the database.
Differing content from the db is exported and from the filesystem imported.
In case of conflict (double changes in both), ask for merge or whatever.
This is very common with the newer, file-based, CMSs, like Grav, Kirby, Jekyll, etc. but unfortunately, for many reasons, we're stuck with Wordpress.
That way we can use git and edit and version content in a much more robust way.
WordPress already has built-in version control in the database, called revisions. If you use different user accounts, WordPress will even lock pages that are being edited, preventing collisions.
Additionally, you can export the database to an .sql file and store it in your custom theme directory which you should manage with git. You only need to version control your custom theme directory, because all non-custom WordPress files already have version control. However, you can export the database every now and then to keep your git repository complete. Additionally you should ask your hosting provider to create daily backups.
This will give you full version control on everything (git for the theme and WordPress for the content). Developers will be able to take the git repository and rebuild the installation locally, to change the theme. Content can be edited remote in WP, with WP versioning and daily back-ups for security reasons.
Note that exporting your database to an sql file can be done by using a database manager like PHPmyAdmin or Adminer and using the export functionality or by using a WordPress plugin.

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.

Install Wordpress Backup with New Fresh Database

I had a website made in wordpress. The database is now corrupt, cannot be restored and I dont have a copy of the database either. However I have a copy of the website folder contents that I made when I installed wordpress. I want to use the same copied files to reinstall the website with a new(fresh) database so that I dont have to go through the whole process of psd to wordpress conversion and all. Is there a way out possible?
Regards.
Delete (drop) all the the site's DB's tables through PhpMyAdmin or mysql CLI, then go to your site url and repeat the install process.
wp-cli has a nice builtin cli tool for doing this: wp db reset
Just wipe the database with the Reset Database Plugin

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