Functions.php reverted to new one

You should not change anything in files inside wp-admin and wp-includes folder. All these files gets overwritten when WordPress is updated. The correct functions.php file is in your theme folder. full path to that file: wp-content/themes/YOUR-THEME-FOLDER/functions.php

Should the page cache be refreshed often? [closed]

The one possibility is caching broken page. For example some database query fails (which is not uncommon in shared environment and/or under load) and some page gets displayed broken / with errors. Since caching doesn’t assume integrity checking it can cache such page… And your cache interval is days – page is broken as long. … Read more

Creating your own widgets: using cache?

take a look at WordPress Transients API which offers a simple and standardized way of storing cached data in the database temporarily by giving it a custom name and a timeframe after which it will expire and be deleted. The transients API is very similar to the Options API but with the added feature of … Read more

Transients API and multisite

Default Transient API behavior is to use Options API for storage and so behavior identical to options. However if there is external object cache (declared by plugin or whatever) then they get stored using object cache functions instead. So basically it will work in scope of current site, unless there are plugins that make it … Read more

APC object caching in combination Batcache/memcached page caching?

The basic rule of thumb for Memcached is: use it if you’re running multiple servers or connecting to multiple databases for the same assets. Another more harsh way to put it: If you don’t know what Memcached is, you probably don’t need it. Since you have a single server(and probably single DB) you won’t be … Read more

Usage of Direct Database Call Without Caching Error

I agree with @Tom J Nowell: I’d suggest you remove it, or better yet just say “all rights reserved”. But in the quest for answers, here’s a suggestion using an option field to cache the years: /** * Get year range for posts. * * @return str */ function wpse_226627_get_copyright() { if ( ! $years … Read more

wp_transients | wp_object_cache VS SESSIONS & Cookies?

set_transient() using wp_cache_set() and mysql database. WP Cache API using $GLOBAL(global session for application). Cookies and Session saves data only for one current user(cookies in browser, sessions on backend). I think better using set_transient(), it has nice hooks and save all data global, even on site disabled cache.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)