Wordpress theme pages have disappeared after host database server change - mysql

A friend of mine got in touch because his wordpress site was showing "error establishing database connection" (the website has been working for 2 years up until now). I checked out his config pinged the database IP and found it timing out. I told him many times he needs to contact his host but he never knows what i'm on about so gets frustrated and just expects me to work magic.
Anyway i visited an address i got sent by i assume the dev/previous dev which took me to phpmyadmin could log into the database, all data is still there, great.
i cannot get the ip as he wont contact the host. so i tried the IP of the phpmyadmin site, no luck (i assume its some sort of reverse proxy as i believe he has shared hosting)
so i just try the 0.0.0.0 meta-address. this works fine
i also notice the database name, user and password has been changed by someone since then. so i plug these new credentials in. Visit the website, great its back up.
however when i visit the site it makes me go through the "wordpress install" which i find weird as i assumed the website would just work. the site just shows the default wordpress page. his website is now gone. i don't use wordpress because its wordpress. so my knowlage is now very limited at this point. Iv looked at the database and i can see in the {websitename}posts table that all his content is there still. for example all the paragraphs for the services he provides, image links etc. i look in wp-content/uploads/2018/01 and all the pictures the website had are still there.
When i go to the wp-admin UI and click on pages tab, there are no pages. all his previous ones are gone. i go to media tab and there no images i go to appearance and activate the theme that his dev used. still nothing. its as if its a fresh install.
as all his content is still i the database and all the files like images are still on the server etc. there must be a way to get his custom pages back?
i'm not sure when he last had someone touch wordpress or any code but is it safe to say the hosts making this change and whoever changed the database name and user is to blame? (he is going to want to know what went wrong)
if its any sort of help here is the theme that is used
any help is much appreciated, thanks
UPDATE
i can see in the {sitename}posts table the post_title column has the name of his pages in post_status is publish or inherit comment_status is closed ping_status is closed

Related

Transferring wordpress from a hijacked domain name

I've read many questions on here but nothing seems to fit my scenario and try as I might, nothing seems to work so far!
My host unlawfully transferred my domain name out from under me resulting ine being unable to use the usual plugins to export my site and migrate it… Nominet enabled me to regain access to my domain name and I’ve transferred it out from 1&1 Ionos to a new host (GoDaddy) and went about setting up a hosting plan with them.
So, what I have is a webspace with Ionos with all the WordPress files and the database from my WordPress site which I’ve downloaded via FTP and my new domain name set up with a Linux server with GoDaddy.
The issue I’m facing is, when I upload the site files I downloaded via FTP and import the database, it keeps coming up with the “install WordPress” screen to set up a fresh WordPress site.
I’ve transferred over the htaccess file and now, it’s trying to download a file that doesn’t do anything (according to the text in the file when opened with notepad).
I’m in a right pickle. Wp-config is all set up correctly so far as I can tell pointing to the new host with the new database username and password.
Can anyone provide a step by step guide on moving from another server webspace to the domain name? All the guides online I can find includes migration whilst the previous site is still active. For me, this isn’t the case.
My issue is (probably) unique because it is effectively a local host set up on the 1and1 server where everything is still pointing to my domain name, I’ve downloaded this and assumed it wouldn’t be too difficult to just upload, reconnect the database and I’d be good to go but it doesn’t seem to be so easy as I expected.
So far, I’ve spent the last 8 hours toying with it myself, and since the 11th June dealing with the domain hijacking and spent much of that time with Ionos and GoDaddy support to try and get it all sorted and up and running… Its half 3 in the morning now and this post is probably going to be my last avenue for a solution before giving up on it! 😂
Really appreciate the help.

Previewing dedicated server MySql not working

I am moving a clients website from one dedicated server to another. (UK2.net to Fasthosts.co.uk) and would obviously like to check everything has transfered correctly before making the final switch to avoid any downtime.
I have successfully transfered everything across such as MySql database, webpages etc. I have set-up the CPanel for the user as well and so now would like to check everything is working. I have manually gone through a lot of the CPanel to check things like the page locations, database etc but will now look at the physical side.
I know that I can view the site live in-browser following with http://xxx.xxx.xxx.xxx/~username (substituting IP and username where needed) but this is where I encounter my problem. The site shows up fine but when clicking to a specific page some of the MySql queries are not working correctly, basically data is not showing up where it should be and I am wondering if this is just because it is a preview rather than the full thing or is there more to this? I have not altered anything of the website just transferred it across to the new server.
I know that this seems a bit long-winded to explain my problem but felt that it needed some back story! Thank-you in advance

Django - looks like the wrong pages/html being displayed inside a firewall, but ok outside

We have just started to deploy our app over four schools with the server located in one school. The Three schools accessing from outside the system are working fine, but when you access from the school hosting the server, its like the wrong HTML is being returned. In one case, a user had a page returned to her with a different users userid displayed on the page. It also keeps going back to the login page even though your still logged in. Outside of the school all's fine.
Any ideas ?
This is one of those problems where it's difficult to pinpoint the cause without actually being there, or having lots more information. My first thought is that maybe you're using ip based virtual hosts and the NAT (Network Address Translation) is interfering with it.
Edit: could you tell us what sort of caching you have in place? Users seeing each others “logged in” pages without even logging in themselves is a sign that you're caching things that only authenticated users should see.

Why my database disappeared then appeared and now again is disappeared?

I am on cpanel, and working with phpmyadmin.
I create a subdomain, then I create a database, and I changed some of my settings.(2days ago)
But now when I login to cpanel, I see that there is something just like ctrl + z! I mean The only database that was created 5 month ago is now remained and the database which I create it 2 days ago is NOT in my databases list! + I changed the menu settings(put the 'databases' menu on the top, put the 'preferences' menu on the bottom of the cpanel home page and ...) but now there are just like the default cpanel setting.
What's the problem?
I am 75% sure that my cpanel login is NOT hacked.
I've changed the cpanel password but not the phpmyadmin password.
You may only be allotted one database with your webhost. Contact their support.
Your host may have restored a backup. Ask them.
I had something similar occur with my vps account recently. While my databases show up within the mysql database menu list they're no longer available in the backup menu. I tried changing themes and it corrected the problem. The theme I had the problem with is X3.
In my situation I believe the theme must have been broken due to a recent control panel update as I noticed the login page has changed drastically but I'm not sure if that's the same issue you're dealing with.
To clarify, I changed the theme within WHM not cpanel. From X3 to X2. X2 is apparently depreciated so this isn't a long term fix to whatever the underlying issue is; just thought I'd share in case it helps you out.
I found out the problem.
I contact with the host provider, and I found out the problem. He said according to the internet problem in your place and also our previous actions to change the server, your host is sometime, loaded by the new server, and sometime by the previous one! So when I create a database from my computer it connect to the first one, then you browse web or again I check the website from another place, then I connect to the second server, and see that there isn't any database!
I don't have much experience, so I don't know, this answer is true or just for kidding!

Database Move Resulting in Blocked IPs?

I'm totally baffled by a recent problem I'm encountering. I've moved the MySQL database of a WordPress site from one server to another. After this, my client reports that they cannot access their site from their offices, but can access it anywhere else.
I've told them to clear cache, history, cookies, etc. No luck. Site just doesn't work in their office and works fine when they are anywhere else. They continue to receive timeout errors.
Site is visible to me on any browser, logged in, or logged out.
Could this be related to the database move? Is this is an unrelated issue that just happened to coincide with this database move?
Your help would be appreciated as I'm dumbfounded.
Check the hosts files or firewalls on the PCs that can't get to the site.
If they can get to the site away from the office, check the routers at the office.