Link to home
Start Free TrialLog in
Avatar of sammySeltzer
sammySeltzerFlag for United States of America

asked on

Can someone please help me make sense of what is going on with my Wordpress deployment?

Greetings mates,

I am facing an odd problem.

Typically, when I build a WordPress website, I build it on my local machine and then deploy to hosting server when ready to go LIVE.

Usually, no problems.

This time, though, I bought a theme called Healthflex.

Build it on my local machine and moved it to the hosting server for deployment.

So far, when I try to launch it from the browser, the page is blank.

Here is the link:

http://www.emeraldhealthcareservicesinc.com

Any ideas why I am having a blank page?

Thanks in advance
Avatar of David Favor
David Favor
Flag of United States of America image

Appears your theme is seriously munged... Here's the problem...

View source of your page shows...

<!doctype html>
<html class="no-js" lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="HandheldFriendly" content="true">
<meta name="apple-touch-fullscreen" content="yes">
<title>Emeral Healthcare Services, Inc. &#8211; Home is not just a shelter it&#039;s a Haven</title>

Open in new window


Maybe a plugin problem. More likely a theme problem, as header has barely been generated.

What's very odd, is your site's returning a 200 (success) rather than 500 (PHP Fatal error).

imac> curl -I -L http://www.emeraldhealthcareservicesinc.com
HTTP/1.1 200 OK
Date: Fri, 06 Oct 2017 13:16:03 GMT
Content-Type: text/html
Content-Length: 443
Connection: keep-alive
Keep-Alive: timeout=30
Server: Apache/2
Last-Modified: Fri, 06 Oct 2017 02:15:56 GMT
ETag: "1bb-55ad76bcabcdb"
Accept-Ranges: bytes
Cache-Control: max-age=600
Expires: Fri, 06 Oct 2017 13:26:03 GMT
X-Endurance-Cache-Level: 2

Open in new window


The easy way to debug this will be to ssh into your machine, so you can do the following...

This tends to be one of my daily activities, so I run all my client sites with the following enabled continuously...

WP_DEBUG
SAVEQUERIES
xdebug.scream

Open in new window


This way when a problem occurs, you have all the log data to debug problems instantly.

Steps...

1) Enable WP_DEBUG in your wp-config.php file + tail -f debug.log to watch what occurs.

2) Visit site.

3) Review debug log.

4) If nothing shows up, install XDebug + set xdebug.scream = 1 in xdebug.ini + redo #2 + #3.

5) If nothing shows up, camp on your WordPress Docroot (root installation directory), with...

inotifywait -mrq /path-to-wordpress install

Visit site.

Make note of last files accessed. The last non-core file accessed is your likely culprit.

Alternatively...

[ ... soap box mode on ... ]

I've tested close to 400 themes from ThemeForest at this point. Only two themes (X + Devoe) were free of backdoors.

You're using a ThemeForest theme. I'd suggest you switch away from using the theme you picked, as it also bundles Visual Composer.

VC is a security nightmare. VC is also shortcode based, so over time + traffic, it becomes slower + slower. Also because it's shortcode based, the only way to strip VC will be to do a complete site rebuild.

[ ... soap box mode off ... ]

I suggest to my private hosting clients they use GeneratePress (light weight theme) + Elementor (Page Builder) as their development stack.

Both these products work every time + are flexible + shortcode free.
How did you migrate the site over to the new host? What tools do you use to help in that process?

I've seen a recent increase in errors like this and have been able to help people fix whatever it is that's been causing this behavior.

It could be many different things. The most recent incident was resolved by replacing the index.php file with a fresh version of it. Somehow that copy was corrupted ( which is abnormal ). Not saying this is your case, but it could also be the .htaccess file or the permalinks or a bad plugin not playing well.

Can you access the admin panel? If so, please try turning off all of your plugins and see if that helps.
Avatar of sammySeltzer

ASKER

Yes, I have access to my admin panel.

Infact, I removed all the unrelated plugins on the site.

Would it help if I delete the entire files wordpress them files I moved to the hosting site and re-transfer?

As I said, this has never happened to me before.

And to David, thanks for your feedback but at this point, using another theme is not an option unless it becomes impossible to fix this because the user has been harassing me about this now for the past three weeks.
Ok, can you check the root of the site and see if there is an index.php file? If so, then what I would do as a next step is replace that with a working copy from a brand new wordpress install. ( Just download the version of wordpress you are using, extract the zip, and copy the index.php file over.

Let's see if that does the trick.
Unfortunately, that didn't work and  I can't find my php.ini file to add the Debug attributes to it because it is a shared hosting plan.
Ok, can you switch to a different theme and see if the site pops up the content?
So, I switch to another theme and the website is showing.

So, this theme is premium theme and it is one license, meaning only one installation.

Could they have taken the installation on local box as actual installation?

If that's not the reason, do you have further thoughts on what I should do?
Ah, we just found the problem.

One of these will get you the solution you seek.

1) De-activate the license on the local machine and activate it on the new site.
2) Contact the support team whom you bought this from and have them deactivate/reactivate. Just explain that you started with a local environment, they will understand.
Thanks, that's kind of what I thought.

Do you know how to de-activate it on my box?
Depends on the theme. Which one is it and where did you purchase it from?
healthflex is the theme name from envato Markets.

I am actually looking for the their contact info so I can contact them directly. That will be faster and easier, I think.
I think it is themeforest
You first step is to enable WP_DEBUG so you know the exact file + line number throwing the Fatal... or maybe there's some other PHP problem, like memory exhaustion.

Before you go off on a wild goose chase, enable WP_DEBUG, so the root cause of problem is clear.
They figured it out. The theme can only be activated once. They activated it on their local machine and since they are now moving it to the live environment, need to request a new activation for the live environment. Pretty common with premium themes in WordPress from ThemeForest.
Yes, I have contacted them.

Speaking of wild goose chase, it is just that trying to reach support group.

A simple phone call would have resolved it but I understand they don't have time to speak to all customers.

So, holding right now till I hear from them.
To enable WP_DEBUG, no reason to call anyone.

Just set this in your wp-config.php file via sftp or many WordPress plugins.

Set it. Visit your site. Check your debug.log. You'll instantly have an answer.
This is weird.

I did as you suggested and this is what I got:

Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /hermes/bosnaweb22a/b846/ipg.emeraldhealthcareser/wp-includes/wp-db.php on line 1548 Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /hermes/bosnaweb22a/b846/ipg.emeraldhealthcareser/wp-includes/wp-db.php on line 1578 Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /hermes/bosnaweb22a/b846/ipg.emeraldhealthcareser/wp-includes/wp-db.php on line 1578


I got this error earlier when I was migrating from local server to production server. I selected the correct username and password and it stopped.

Now this?
Are you running the same PHP version on the host machine that you did within the local environment?
I would also still follow up with support for your theme ;)

By activating a different theme, we proved there is nothing wrong with the site. It's the theme, so next step is to get their support team to help figure out what the issue is -> more than likely it's too many attempts at activation.
Good point but this is part of the error that I mistakenly left out:

Error establishing a database connection

Is this error occurring because of the debug we set?
The error showing means you're running PHP-7.0 or PHP-7.1 + your theme is coded using a deprecated API.

Contact your theme's developer to change their code from using deprecate mysql_*() calls to using mysqli_*() calls.
Just for kicks and giggles...what would happen if you uninstalled the theme and re-installed it?

I'm guessing they have logic in that theme to handle the different PHP versions...

Give that a whirl and let us know.

Also, whatever became of the conversation with support on the theme?
The theme support team has not responded to my request. That's why I called it goose chase.

Just on a holding pattern right now,

If I uninstall the theme, what happens to all the content, images that I have already put there?
I don't think you have anything to worry about for 2 reasons.

1) You have a backup of the environment locally on your machine.
2) WordPress functions by keeping content/images/etc...separate from the theme.

That's the only reason why I think it's worth a shot at doing it.
Sammy, couple of things.

1) I avoid ThemeForest code like the plague. After testings 100s of their themes only two (X + Devoe) are free of backdoors.

You can prove this yourself by running the Theme Check + TAC plugins against your theme.

Who knows, maybe you'll get lucky + you're theme will be the 3rd clean theme found at ThemeForest.

2) If I found a theme using APIs which had been deprecated since PHP-5.5, I'd avoid that theme like the plague, as the theme developers are coding in a bubble. Meaning, they aren't keeping up with basic PHP news.

PHP-5.4 was the last version mysql_*() was supported on. PHP-5.5 + PHP-5.6 maintained the code + also spewed warning messages about this deprecation.

So this is also another strike against the developer, as they either weren't vetting their own code using WP_DEBUG or they were ignoring all the PHP diagnostics. Either option suggests a developer, I'd personally avoid.

3) If they're non responsive about fixing a simple problem like this, best pick another theme.

4) All the above together would also suggest to me this theme was likely coded poorly... or rather... if the developer was unable to deal with baseline code quality/functionality issues, I'd guess they were also clueless about writing high performance themes also.

This may seem harsh + I've had countless clients tool their businesses around... less than stellar quality themes + then have to pay large sums to retool their site.

Best to begin with a firm foundation.
I finally heard from them and they said the problem was not a licensing issue.

They said it could either be installation issue or domain issue.

They further stated that if it works fine on my local machine, it should work on the production server,

I will contact the hosting company today to see what they can do.

In the meantime, David, since you are insisting on another theme from another company, giving that I am using HealthFlex theme from plethorathemes via Themeforest, and since I have shown this to the client, where can I find something similar to what I showed the client?
Andrew, I have one more question, do I have to also delete the MySQL database that I imported from my PC?

I really like this option better rather than to start all over with a new theme.

But I will have to hear what the hosting company has to say to fix the current issue we see on the site.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Derse
Andrew Derse
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK I deleted the files and reinstalled as you suggested and YEA it is working!!!!

I just need to do a few tweaks here and there.

There is memory allocation size issue. I contacted the hosting company and the increased the size and all is well now.

Thanks very much.
Great job! Glad it is up and working!