No body class in Wordpress on specific server - wordpress

I have the strangest problem, I get no body classes on different Wordpress sites on a specific server. When I'm developing the site (http://parka-jassen.nl) local on my Xampp installation, all is well. But when I upload it to my web server i get no body class (just have ).
The same problem also occurs with other Wordpress sites on the same server, so I figure this must be a server problem. I'm using CentOS 6.5 with Plesk 11.5.30, Apache 2.2.15, nginx 1.5.0, PHP 5.3.3 and MySQL 5.1.71.
WordPress adds body classes with the body_class function. But also when I manual enter a body class (for example I set in the code) then I still get an empty class displayed in the code.
To be certain I tried different themes and deactivated all my plugins, but nothing offered a solution. Is there anyone with an idea what this could be?
Thank you very much in advance!
Jeroen

Related

Why is the www version of website not working properly?

I'm facing a problem with the following website: https://www.rhythmandstrums.ie/
When I open the "www" version of it: https://www.rhythmandstrums.ie/ I get a bugged website, failing to open stylesheets and possibly other file sources, whereas if I open the website without the "www", everything works as expected: https://rhythmandstrums.ie/
Some considerations:
This website is hosted in a Wordpress Multisite, so it shares the same configuration files as other websites, none of the other websites have this issue. So I was wondering if this could be a problem with redirection, although, again, none of the other websites have this problem and they share the same config files (including server block settings and such, it is in nginx).
I have checked the DNS values and nameservers and everything looks fine (I took base from all the other websites that were set up in the same way, I can post a screenshot if it might be of help).
This error also seems to happen in the Wordpress backend, with the admin dashboard not being able to load parts of plugins, it seems like it is looking where it doesn't exist.
I have replaced instances of the www version of the url in the database, as I do with other websites as well, but that didn't seem to fix the issue.
I have cleared cache a few times (both in the cache plugin and manually in the nginx server - manually deleting the contents of the cache folder), and since this has been going for a long time, I don't know if this is cache related, but any suggestion is highly appreciated. Again, all the configs, included the cache plugin settings are the same for all the other websites in the network, which none are having this issue.
If I inspect the console when I'm accessing both versions of the website, www and non-www it seems like it's trying to pull information from different locations, but I can't figure out why it's doing that.
Guys, I hope this was not confusing, but let me know if you you would like to see screenshots or other info that might be relevant. Thanks so much in advance, I really appreciate it.

wordpress local migration error

I'm trying to migrate my wordpress site to a WAMP hosted localsite so I can have a safe environment to edit the site and learn how wordpress works properly. (before I decided to do this had to rebuild this site from memory 3/4 times because I'm an idiot who didn't realise that backing up is my best friend)
this is my live website
http://guitarlessonswithmax.com/
Using the following youtube video:
https://www.youtube.com/watch?v=C8LgYkfnJpc
I managed to get my wordpress sort of working using WAMP but not to the desired outcome as you can see in the screenshots provided in the imgur album
https://imgur.com/a/bjZRI
So as you can see the content is sort of there but minus the wordpress formatting which you can see on the live site.
Thanks in advance for taking the time to read this.
F12 in your browser to bring up the developer console. You can probably see a lot of '404 not found errors' where your installation expects files.
Install PhpMyAdmin and enter your database. Check the table wp_options. There should be two entries (siteurl and home ), ensure they are correct for your local installation.
Even simpler if you use WPTunnel for this purpose.
It creates a local WordPress installation inside a Docker container and proxies it to yoursubdomain.wptunnel.com:
https://github.com/dsdenes/wptunnel
disclamier: I'm the author of the library

WordPress website not working with domain name but IP address

http://sidparmar.ca/portfolio/ This is my portfolio website and an only home page is working with the domain name. Every link is broken unless replaced by IP of my VPS which is 64.20.53.42.
So usually it should work like sidparmar.ca/portfolio/contact/ (give me an error "The requested URL /portfolio/resume/ was not found on this server.")
but currently, it is only working if I type 64.20.53.42/portfolio/contact/ as URL.
Please let me know if you have any suggestions/advice or pointer that I should look into. Any help is appreciated.
Has your site been like this since you installed Wordpress? If so, then where did you install wordpress (i.e. what directory)? It looks like you did not install it in the web root directory of your web server. Also, when you installed Wordpress, are you sure you specified the correct URL of your website?
My suggestion based on the limited information you provided and the minor amount of custom content of your website is to simply delete your database and files, create a new database, and re-installation Wordpress following exactly the correct instructions. Your VPS host may have an outlined process for you.
Alternatively, if this is a new issue, do you think you caused it? If so, what did you do? If not, you should probably contact your VPS host to see if you or they need to make an update in your DNS settings.
Found the answer by myself! Yeah!
I just added "ServerAlias www.domainname.ca" to my apache2 conf file (000-default.conf) which you can probably find at /etc/apache2/sites-available directory in your VPS.
Not sure why this worked or what exactly caused the problem but I am sure that it happened because of Yoast SEO plugin.

Wordpress Multisite Siteurl & home setup creating odd paths. Why?

As always thanks in advance if you can help.
I'm seeing a very weird issue with a multisite. Currently it has the following multisites setup:
www.domain.com
www.domain.com/london/
www.domain.com/paris/
www.domain.com/berlin/
Each subdirectory site uses a different child theme (containing a few changes to css in each) of www.domain.com overiding theme.
The network sites each have the setup options for Siteurl and Home, which each reflect the setup of:
Siteurl:www.domain.com
Home:www.domain.com/london/
This works fine, but BREAKS the backend navigation for the /london/ website trying to force all wordpress links as www.domain.com/wp-admin rather than www.domain.com/london/wp-admin.
I changed the network setup of each website to the equivalent of:
Siteurl:www.domain.com/london/
Home:www.domain.com/london/
This fixes the navigation for the backend of www.domain.com/london/wp-admin but breaks all path files for calling anything from the parent theme and breaks all css/images in the backend of wordpress.
This is dricing me crazy! Anyone else seen anything like this before?
So the answer to this if anyone finds this was that our server was running NGINX without us realising which caused some pretty weird conflicts with the wordpress url re-writing. We simply turned it off and just run the server with stand alone Apache and it worked!

Wordpress Multisite Not Working after Migration to New Server

I have a Wordpress Multisite which was working fine until I migrated the instance over to a new physical server.
The funny thing is that The instance itself is fine: I can get to everything except one of the sites. I cannot get to it's Admin section either, both the individual site and it's admin section come up as blank white pages. But none of my other sites do which I find rather weird.
It's not a database connection issue. I don't believe it's an .htaccess issue because i just copied over the same .htaccess file from the server that the whole instance was previously working on.
The only thing I can think of is that the Drive that Wordpress sits on is now different (D: now as opposed to E:).
I have mod_rewrite enabled and like I said all the other individual sites are working along with their individual admins.
I moved from Windows 2003 server to a Windows 2008 server and they are both on Apache Web Server.
Anyone else have the same problem or know of a way to remedy this?
A blank white page is a php error.
Check your error logs. That one site is using a plugin or theme with a conflict.

Resources