WordPress horizontal scaling: how to share files across servers? [closed] - wordpress

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
So in a project i'm working on i'm trying to horizontally scale wordpress, my actual stack idea is :
HA Proxy as a load balancer
3 webservers behind the load balancer running Nginx/ PHP7
1 Redis Server
1 or more MySql servers to make sure everything is ok for high availability
The issue comes to my mind when I think about file uploads, if a user tries to upload a picture to wordpress, the picture will be available only in the Nginx/PHP VPS the loadbalancer gave him.
My question would be something like :
How can I centralize all uploads ? Like using a "shared" wp-content folder ... I've read about GlusterFS and Ceph, will these be usefull ?

Rather than solve this strictly at the backend, I'd suggest you first consider something like CloudFlare in front of your WordPress site. You could setup caching on the upload directory... You're going to get enormous horizontal scalability out of that. And it's basically free and pretty easy to setup. We've got CloudFlare in front of a site serving over 500,000 page views a day and you'd be shocked at how light the load is on that server.
Beyond that, if you do put a load balancer up in front of your site, you should be able to have it route traffic from the same user to the same backend node, so it should be consistent for that user for the duration of their browser session. That'll give you time for a file synchronization tool of some kind to keep all of your balanced nodes in sync. You might look at https://github.com/bcpierce00/unison for this.

Related

WP Multisite /china/ blocked in China [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am struggling to know why my Wordpress website is blocked in China.
Services I have running on the root site http://example.com that I believe are being blocked are:
Google Maps,
Google Analytics
Google Recaptcha
Vimeo
Facebook/Twitter share buttons
My multisite subsite I have added in a whole bunch of conditionals for the above services to turn them off for http://example.com/china/ however this is still blocked.
Not sure how china firewall blocking works, do they search on keywords in your code? like "recaptcha" "google" "facebook" "vimeo" etc and/or does it grab the resources from the root site?
I have viewed some other websites page source on china server which are not blocked and see google analytics, google maps, facebook icons etc, so I am a bit confused.. ?
Any help would be great.
This was caused by an infinite redirect that was happening. We used this to identify the cause https://www.websitepulse.com/tools/china-firewall-test
How do you make sure your site is blocked in china?
Based on my experience it is possible that your IP address is being used as a proxy

WordPress installed Manually in subdirectory then mapped to using addon domain [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
New here...
I manually installed WordPress in a subdirectory of my hosting, and built a website prototype. The folks I created the prototype for, decided to go with it, so I then created an add on domain pointing to the subdirectory, and had their DNS mapped to my add on domain name.
Everything works, except, only the main page shows in the menubar as the domain name. All others (and all links) show as my original domain / subdirectory.
Is there anyway I can get things synced up so that everything is under the add on domain name?
You will need to update the all the links within the database. I suggest using a tool to do this as a lot of the database entries are serialized so you can't do a simple find and replace.
First backup your database.
After that use this tool
You will want to do search for olddomain.com/directory and replace it with newdomain.com
While it is great that the (clever) hack you did has mostly worked, you might want to do things differently taking into account the long-term stability and reliability of the site. (This might seem like a spot of bother, but like I just said, it should not only take care of your current problem but also ensure long-term stability of the site.)
Here is how I would do this:
In the first instance, do not map the add-on domain to the subdirectory of the other domain, but create a regular directory for it (if you have cPanel, that would be the default path when adding a domain).
Next, install the following plugin at the staging/demo site:
https://wordpress.org/plugins/duplicator/
Next, generate a Duplicator package (via the plug-in's menu on wp-admin dashboad).
Once the package is generated, download the two package files (installer.php and the archive/zip file) to your PC. Next, upload these two files to the live domain where you wish to create the site. Next, open the following link in your browser:
http://{your_domain}/installer.php
and follow on-screen instructions. Your site should get created and everything should work fine. (This is a WordPress site migration plugin/method that I've been using for a long time, for all sorts of use cases - including the one of yours - with great results).

Asp.Net MVC Site with more Images - Need CDN recommendation [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I currently have a Travel site built using Asp.Net MVC. The site have many articles and albums with lot of images asssociated with it. Currently, we are uploading the images locally to a folder and linking it in the article content and similarly for the albums too. Since the number of images are growing day by day, there are more loads on the webserver for every request which downloads lots of images.
I have seen other sites where they do similar thing by referring the images alone from a subdomain and some using CDN.
I am currently having shared hosting site plan and i need to reduce the stress to webserver by rendering the image from elsewhere.
Is there any CDN recommendation that is not so costly but can integrate well with my ASP.Net MVC site? I want to only upload the image to a CDN and link the image from CDN instead of local folder from the article posting page.
If CDN is not the option, can anyone suggest something else to serve my purpose?
Thanks in advance!
Yes, You need to move content to CDN. Because CDN provides very huge speed over network and it will reduce traffic to your web server.
There are very high range of CDN's available in market. I would suggest some of those for your purpose.
CDN77
Azure
MAXCDN
Akamai
From all above, CDN77 and Azure are less costly than others as per my experience.
and also you should try CDN77 14days free trial for testing purpose.
Thanks,
Hayat S.

Wordpress admin interface takes forever to load [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
TLDR Version : Wordpress admin interface does not load
I have a WordPress blog, I have been using it for over 2 years.
Recently I have been experiencing this problem. Al pages login, add new post, dashboard i.e all admin interface pages take forever to load.
I tried debugging this problem, below is a network stat info from my firebug.
It seems that my wp-admin.min.css takes a lot time to load.
Also then I reliased may be this has something to do with the Wordpress Latest Update I had done. But I am not sure, how do i fix this ?
I have search a lot on this, but just couldn't find a solution for this.
It might not be your WordPress installation at all (but rather something about your own internet connection or machine setup). The login page loaded very quickly for me, and here you can see a complete analysis from Pingdom.
It took less than half a second to load. I would try a few of these things to narrow down on the problem:
Reboot
Try a different browser
Try a different computer
Try a different network / location

How cloudfront works? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm planning to Implement CDN(Content Delivery Network) of Amazon which is known as CloudFront in ASP.NET MVC3 with c#.
I've googled about it but little bit confuse about few things mentions below.
Is it compulsory that we have to uploads all static resources to CDN Network first and then we can use or Is it manageable by Amazon to crawl site static resources which is predefine folder or directory of sites?
Is Amazon automatic update its copies when we anything change in static resources or every time we have to upload updated resources to CDN network.
CloudFront is basically a cache. When a resource is first accessed it contacts your origin servers for a copy, you don't need to preload anything. If you are serving static resources the best way is to give it an S3 bucket with the resources in.
If your origin servers set HTTP cache control headers then CloudFront will use them to determine how often to check for updated files. Otherwise you can set a default timeout in the CloudFront settings. Here is Amazon's documentation.

Resources