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

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.

Related

How to find posts and pages in the backup

I have backup of my site on my pc and i'm trying to find posts and pages (my site content) but i can't find them, in what folder in backup should i search in please?
Posts and Pages aren't stored as files in WordPress, they are stored in your database. If you open up your wp-config.php, you'll see what database tables/prefix your installation is using.
Depending on how you backed up your website, there may be a file (perhaps a .sql file, or .tar.gz file, or some proprietary file) somewhere, often in the base directory, or in the wp-content or wp-content/uploads directory. If you don't have a file like that somewhere, or just backed up the files straight from your hosting account (such as cPanel), you'll need to go back in there and download a backup of your database as well.
Also note that pages, posts, and other custom post types are stored in the wp_posts table, all together. If your site relies on custom fields, those will be stored in your wp_postmeta table.

Can't Upload Images or Plugins via Wordpress Admin

I have a website that I just transferred from one server to another. I did this by copying all the files via FTP from the old server to my computer and then to the new server. I changed the URL in Settings to the new url and I downloaded a copy of the database. I then uploaded the database to the new server and changed all the database info in the wp-config file. Afterwards I used Velvet Blues Update URLs to make sure all the URLs have been changed in the database.
After doing all the the website is working fine. I could update my plugins and my WordPress core files that needed updated.
The problem is now I can't upload a plugin from my computer or any media files like images. When uploading an image, I get this message:
“image.jpg” has failed to upload.
Unable to create directory uploads/2017/03. Is its parent directory writable by the server?
I checked and this directory is already on the server. In FTP I changed the folder permissions to all be set to 775.
I then tried to change the folder structure for media files to not be broken into month/date folders and I get this message:
“image.jpg” has failed to upload.
Unable to create directory uploads. Is its parent directory writable by the server?
I know this directory exists and is set to 775. To double check I also change the wp-content directory to the same permissions.
What am I doing wrong here? Why can't I upload images and plugins via the WordPress backend?
I actually think I figured this out. I went into Settings -> Media and noticed there was a box that says Store Uploads to This Folder and had a folder for the old website. I deleted the information that was in that box and updated the settings and now it works!
I had this exact issue today. After much troubleshooting, I solved this images not uploading issue -- specifically, when I clicked the upload button, no dialog window appeared. As a new WordPress installation, the dashboard was displaying asking if this was going to be a business or personal site. When I clicked I DON'T NEED ANY HELP, then I saw the normal dashboard with WooCommerce module displayed and I was able to upload media files and images from my hard drive.
I'm posting in case this answer can help someone else having this very weird problem. Also, it is possible that a plugin like OpinMonster might be what generated that "business or personal" message.

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');

Wp admin page isn't accessible

When I go to http://www.cowrubber.com/wp-admin
the url changes to
http://cowrubber.com/wp-admin/cowrubber.com/wp-login.php?redirect_to=http%3A%2F%2Fcowrubber.com%2Fwp-admin%2F&reauth=1
Somehow I just can't access the admin page to login.
I have copied the site from an test site on the localhost. And changed the url's in the database to the new ones but due to unknown reasons I just can't access the admin site.
When you move a wordpress to a differently named domain, it is not ehough to just search and replace in the database, because wordpress (sadly) store a lot of things in serveral table in serialized format.
So what you need to do is, in your case:
Create a backup of your local database.
Create a backup of your current production database and file.
Delete all the files from your production server, and drop all table from production database.
Copy all files to your production server from localhost.
Import the local database to production database.
Do not open the production wordpress site in the browser!
Go to here, and download the newest script: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Unzip it into a wp_replace directory.
Upload this directory to your document root, where wp-conifg.php is.
Go to the http://example.com/wp_replace/
Fill the From and To fields, without http:// and without trailing slash. Eg: somethinog.localhost to 'example.com`
Live run it. You will see, how many records changed in wich tables.
Delete this wp_replace directory. If you leave it, add a htpasswd to it otherwise anybody can crash your db.
Go to the WP admin, navigate to Options -> Permalinks. Push save.
Now you can use your new domin :)

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.

Resources