Few Queries (Wordpress/Nginx/SSL related)

October 4, 2016 1.2k views
Nginx WordPress



I have few queries (If you dont mind)

1.) My WordPress home page is pointing to a domain name (ex abc.com). But all internal such as page/assets/images point to ip address. (like WHat could be the problem?

2.) how to redirect http traffic to HTTPS.

3.) WHich one is best varnish or redis cache for quick loading?

Thanks a lot

1 Answer

To answer your first two questions, make sure your server name in your Nginx configuration is set to your domain (abc.com) and not your IP address or _ as that is how Wordpress recognizes and creates URLs off of. Additionally you will want to look at a few articles on moving Wordpress as if you didn’t set Wordpress up as HTTPS and are trying to move it to HTTPS, it is quite difficult since Wordpress keeps many references to your site URL in the database. Going through the moving procedure may also fix the first issue. I’ve linked some references here:

As for caching, I would look at Wordpress and PHP caching before using an external service such as Redis and Varnish. I’ve linked to some below:

Obviously fix your issues with 1 and 2 before installing a caching system. Also make sure to snapshot/backup before doing any of this!

Have a good one!

Have another answer? Share your knowledge.