Wordpress Database connection limit - php

I have installed WordPress at Azure, and my database is limited to four connections at maximum.
For blog and website pages, will all the new pages and content be pulled from the database every time the user will visit the website? Or is it HTML generated pages?
Any way to avoid database dependency that HTML pages are generated.

First your questions:
if you won't use cache, yes.
using wordpress cache plugins.
There are some things you can do:
Install a mysql in a Virtual Machine or upgrade your clear db (microsoft partner that offers mysql in azure) to a special version.
Use wordpress cache plugins, so it will create a in memory version of your posts posts and avoid a DB hit every time.

Related

WORDPRESS - Clone Website on a New Installation to Update It

We need to recreate our site from scratch. When I mean from scratch I mean we want to keep the same content (pages, articles, URLs and tons of media) and move it to a new WordPress installation with a different theme.
A brief background to try to understand what the underlying problem is. The current site (the one to be copied and transferred) is HUGE. It has more than 1500 pages and 3000 articles. It is currently running on an old version of WordPress and an outdated theme. We are deliberately not updating WordPress, theme and PHP so as not to risk crashing and being left without a site (this has already happened in the past with another installation).
What we have done is to create (on the same hosting) a new, updated installation of WordPress (on another directory). This will be the new and definitive one. Then – when all is said and done – we should use the name of the first installation (but this will be another issue to deal with at the end). We decided to operate in this way because we want everything to be done as safely as possible.
Some details:
Objective: SITE 1 -> SITE 2
SITE 1: Installation: domain.org/directory1 WordPress 5.2 PHP 7.1.33
Theme: Awaken
SITE 2: Installation: domain.org/directory2 WordPress 5.7.1 PHP
7.1.33 Theme: Divi Builder
At the moment, we have already installed the new theme in directory2 and created the home page that will host all the pages and articles from the old site. We are not interested in keeping the plugins. Our aim is for the new installation to be as “clean” as possible, without the risk of dragging around old problems.
What do you think is the correct way to proceed? Again, the most important thing is that the links are not changed (so that the URLs will still work once the change has been made; I mean: domain.org/directory1/perma/link/article-written-in-the past = domain.org/directory2/perma/link/article-written-in-the past
Could the export/import tool do this job? How should I proceed to make sure that I don’t affect the performance of the new site? Is it possible to carry out a test with a few pages to see if this can be done?
Thank you all!
The first step is to create a backup of the existing site. You can do this manually, you need all of the site files plus the database.
However, Duplicator is a great plugin that will create a backup package that includes everything for you. One thing to be aware of is the size of your site may cause issues for the plugin do to server load, but its the easiest method. There are other plugins as well to help with migration.
Once you have everything you can copy it to a new domaon like dev.website.com. The installer from Duplicator will help with the url updates, but its pretty easy to adjust in the config file and database options table. If you use relative urls most things wont be an issue, but a simple find and replace in the database will easy update any absolute urls.
Once you have made all your changes in dev you just reverse the process by writing over the live site and your set. This is safe beacuse you have a backup of the live site from step one in case you need to revert to the current state.

Wordpress Multisite MULTI DATABASE

I have recently discovered the multisite functionality of the wordpress core. really exciting! After digging around some more, I noticed that the database simply replicates 9 tables each time we create a new subdomain; but keeps them all in the same database.
The project I am in the planning stages for has a high amount of data information to be stored. The information that would be stored would be proprietary for each company that uses the site.
My question is this. How would I go about getting the entire database to replicate vs getting just a few tables to replicate? Basically, I am looking to create exact copies of the site over and over and over, but each site would have its own database. eventually, each copy of the site would be created once a customer has paid to use the service.
I have seen shardb and hyperdb, but they actually just add databases to store tables from multiple subdomains (at least thats how i interpretted it) to increase site speed.
Im not concerned about site speed as much as I am security and redundency.
Any ideas?
One of the features of MultiSite is that all the WP instances use a single WP installation, and a single database, just with different tables.
In answer to your question, a plugin you could use for this is Multi DB https://premium.wpmudev.org/project/multi-db/. Although this plugin is no longer officially supported by them anymore, it's still compatible with WP 4.5.3 according to the site.
As for redundancy, you could run 2 linux VM's for hosting the databases, one a primary, one a failover
If you've heard of EduBlogs (Like Wordpress.com, but for education), they host about 3 million blogs using Multisite. The guys behind it are WPMUDev (Linked to above) but here they have a thorough article for Multisite for a large number of sites and the potential Database issues you may encounter: https://premium.wpmudev.org/blog/ultimate-guide-multisite/

Migrating Wordpress multisite to single sites

I am moving 11 sites that are currently in a Multisite configuration in an internal network, and would like to migrate them to WP Engine as single individual sites.
I would like to use phpmyadmin to export the data site by site. I am using HeidiSQL to connect to the database and exporting as sql. I will need to manipulate the data, turning it from a multisite to a single install.
What specifically should I be modifying?
-removing site id (i.e. wp_17 to wp_)
-what else?
I would test the plugins first before I do the migration, I know 11 sites will take too much time.
although keep in mind that 99% of the popular plugins has been tested to a newer vision of WP.
Don't forget to change the Wp_config from multi-sites to individual.

Display articles from other Joomla site

I have 13 sites in Joomla installed on one server.
One main site + 12 other sites.
Each site is a diffrent Joomla installation (based on the same template etc.)
Now I need to display news from Main Site in Other sites.
I'm thinking about:
Do this by RSS but I have a news slider and it doesn't support RSS chanles.
Make PHP script, when I inserting article on main site, insert article directly to databases of other 12 sites.
Make custom script to parse content from main site and load like news in other sites.
Do you have any ideas? How to do this?
If all of the website databases in question are on the same server I would directly query the relevant tables instead of going through all the trouble and overhead of setting up 12 different RSS feeds. This is assuming there is no other business need to implement those feeds to the outside world.
Check out the below link on how to connect to external databases using Joomla's core database classes. Depending on how you structure, you could write one module with connection, table and query options that can be installed on all websites. This allows you to accomplish your goals for all websites while only having to maintain one modules code package.
http://docs.joomla.org/Connecting_to_an_external_database

Wordpress site performance related

I have a wordpress site and I replaced the home page with static html page with links to the posts in my site. In one section of the site I am loading recent 10 posts. For this I am using a notepad file, where I am storing the recent 10 posts links( In order to minimize database queries )
Will there be any advantage in calling the data from the notepad file, instead of a database query.
Please suggest me some tips to enhance the performance of my site.
Wordpress sites can quickly become pretty slow, especially if you're using a lot of plugins etc.. Fixing this by manually creating static pages seems a bit shortsighted to me, since you're basically throwing the main reason for using a CMS–like system out the window.
It sounds to me like caching should solve your problems just fine. Install and configure e.g. a plugin like WP Super Cache and you server will automatically create, update and serve static HTML for you.
Use WPSupercache + Cloudflare , All your traffic will be routed through the CloudFlare system, and you'll enjoy all this features and more for free :
- Cache all your static content automatically (FREE CDN).
- They protect your web site.
- Website preloader.
- (JS - CSS - HTML) Files compression.

Categories