Configurar SQL para permitir conexiones remotas
Estuve jugando con un SQL express, la versión 2008 r2, y cuando quería hacer la conexión desde un equipo de red me daba un error: Error relacionado con la red o específico de la instancia mientras se establecía una conexión con el servidor SQL server…
La solución es bastante simple, debe estar configurado el acceso remoto, así que en el equipo donde esta instalado vamos a: Inicio > Todos los programas > Microsoft SQL Server 2008 r2 > Herramientas de configuración > Administrador de configuración de SQL Server 2008.
Ahí vamos a configurar 2 parámetros con Configuración de red de SQL Server, en ambos protocolos habilitamos TCP/IP
Posteriormente queda reiniciar los servicios, por lo que hacemos tecla de windows + R, services.msc y reiniciamos los servicios de SQL
Cabe destacar que tenemos que tener habilitado en el equipo donde esta instalado sql el puerto 1433 TCP y UPD habilitados para poder usarlo, ya sea en el firewall de windows o en el firewall del anti-virus.
Makes WordPress Faster
WP Super Cache is a static caching plugin for WordPress. It generates html files that are served directly by Apache without processing comparatively heavy PHP scripts. By using this plugin you will speed up your WordPress blog significantly.
This plugin is a fork of the excellent WP-Cache 2 by Ricardo Galli Granada. WP-Cache 2 caches the pages of your WordPress blog and delivers them without accessing the database. Unfortunately it still means loading the PHP engine to serve the cached files.
WP Super Cache gets around that. When it is installed, html files are generated and they are served without ever invoking a single line of PHP. How fast can your site serve graphic files? That’s (almost) as fast it will be able to serve these cached files. If your site is struggling to cope with the daily number of visitors, or if your site appears on Digg.com, Slashdot or any other popular site then this plugin is for you.
Download and Install
- Remove any existing instances of WP Cache, as WP Super Cache is a drop in replacement. Don’t forget to delete the files wp-content/advanced-caching.php and wp-content/wp-cache-config.php. Also comment out the WP_CACHE define in wp-config.php.
- Download the newest version of the WP Super Cache plugin and follow the instructions contained in the readme.txt file. If you have installed WP-Cache before this shouldn’t be any more difficult.
- After installation, go to the WP Super Cache options page and set your desired cache time.
How it works
A classic method of preparing an under powered site for a Digg front page appearance or a Slashdotting has been to manually save copies of dynamically generated pages, and place them in directories that match the permalinks structure. This method of performance enhancement does help servers handle a higher load without crashing, but is only effective when an oncoming rush of traffic can be anticipated. WP-Cache alone, while helpful, is not adequate in many cases, so WP Super Cache was created to effectively mimic the manual page caching method, but to handle it in an automated fashion.
When a visitor who is not logged in, or who has not left a comment, visits they will be served a static HTML page out of the supercache subdirectory within the WordPress cache directory. If you navigate to that directory you can view an exact replica of your permalink structure as well as the HTML files within the directories.
To determine if a page has been cached, view the source and the last lines on the page should read something like
You’ll only see the last line if compression is enabled.
If you have compression enabled it is no longer possible to determine which cache the page was served from without looking at the page headers. Pages served from the WP-Cache “half on” cache will have an extra header.
There are many ways of viewing the headers.
With compression disabled, the text will be displayed at the end of the page if the page is served from the static Supercache.
Use ismyblogworking.com to check if compression is working properly. It will also show just how fast your blog is now.
- A plugin and hooks system. A common complaint with WP Cache was that hacking was required to make it work nicely with other plugins. Now you can take advantage of the simple plugin system built in to change how or when pages are cached. Use do_cacheaction() and add_cacheaction() like you would with WordPress hooks. Plugins can add their own options to the admin page too.
- Works well with WordPress MU in VHOST or non-VHOST configuration. Each blog’s cache files are identified to improve performance.
- Normal WP-Cache files are now split in two. Meta files go in their own directory making it much faster to scan and update the cache.
- Includes this WP-Cache and protected posts fix.
- Automatically disable gzip compression in WordPress instead of dying.
- As Akismet and other spam fighting tools have improved, the cache will only be invalidated if a comment is definitely not spam.
- A “lock down” button. I like to think of this as my “Digg Proof” button. This basically prepares your site for a heavy digging or slashdotting. It locks down the static cache files and doesn’t delete them when a new comment is made.
- Supercache static files can be regenerated while serving a slightly out of date file. This will significantly lower the load on a busy server with lots of traffic and comments. Think of it as an automatic “lock down mode” for every page on your site.
- Automatic updating of your .htaccess file. (Backup your .htaccess before installing the plugin!)
- Don’t super cache any request with GET parameters.
- Better version checking of wp-cache-config.php and advanced-cache.php in case you’re using an old one.
- Better support for Microsoft Windows.
- Properly serve cached static files on Red Hat/Cent OS systems or others that have an entry for gzip in /etc/mime.types.
- The Reject URI function now uses regular expressions.
- Supports the Bad Behaviour plugin if installed (Half on mode only).
- Supports plugins that show a different theme to mobile devices.
- If you’re logged in or have left a comment you’ll never see a super-cached page. You’ll see plain old regular WP-Cached pages instead. That’s not so bad since a huge majority of your visitors will never leave a comment.
- Mod Rewrite is used to serve the static HTML pages. As fancy permalinks is also a requirement it should already be installed.
- Some sites have problems serving compressed html files and need extra configuration.
- Don’t expect a cheap hosting plan to survive a major traffic spike, even if it is cached!
- Remember that dynamic content such as that within the sidebar, will only refresh when the cached pages are refreshed. This timeout value can be modified, but cached files will only be removed if you have a healthy mix of static and dynamic requests.
- Some plugins like SK2 and others that depend on “fresh” data may not work very well, at least until those plugins support this plugin and clear the cache when required.
Benchmarks coming soon, but under high load, serving static html files will always trump dynamic PHP requests.
WP Super Cache has also been tested under real world load conditions. The following articles appeared on the Digg front page without issue while running WP Super Cache:
- 25 Photographs Taken at the Exact Right Time – 5,300+ Diggs (server slowed down a lot, see my note about cheap hosting above!)
- 13 Amazing Cirque du Soleil Performances – 624+ Diggs
- The 10 Craziest Competitive Sports (You Never Heard Of) – 520+ Diggs
- Scott Beale uses WP Super Cache on Laughing Squid. He posted about his experiences using the cache during a traffic spike when a posts made it onto the Digg frontpage twice, on to Slashdot, and received major media exposure. Here is his traffic graph for that time. Over 200,000 page views in one day. Could your server handle that?
Sites using the Super Cache
Here are a few of the sites that used and helped me build and debug WP Super Cache:
- My own blogs, Holy Shmoly! and In Photos dot Org.
- Edu Blogs tested the cache and helped make it work better with WordPress MU.
All my sites are hosted on Linode and I can’t complain about them. They’re great.
Support queries and requests should be made through the Super Cache forum.
Getting WordPress Super Cache to Run on a Windows (IIS or Apache) Server
If you’re a regular reader, you probably know by now that we just love performance and can’t get enough of server performance-improving software/code… Especially when it comes to WordPress.
Donncha has recently released a great plugin for WordPress, called "WordPress Super Cache." It builds on the original WP-Cache plugin by Ricardo Granada – except that it fixes all the bugs in the original implementation and has been written in enough pure PHP that it’ll also run on Windows servers – both IIS and Apache for that matter!
At the moment (as of version 0.3.1) it needs a bit of work to make it run, but not much. So here goes – 10 easy steps to get cached content on your IIS or Apache server under Windows:
- Download Donncha’s plugin here.
- Extract it so you have a /wp-content/plugins/wp-super-cache/ directory with all the files (like wp-cache.php) in there.
- Open up /wp-content/plugins/wp-super-cache/wp-cache.php and locate this:
[sourcecode language=”php”]function wp_cache_check_link() <
global $wp_cache_link, $wp_cache_file;[/sourcecode]
- Replace that with [sourcecode language=”php”]function wp_cache_check_link() <
global $wp_cache_link, $wp_cache_file;
if ( file_exists($wp_cache_link) )
echo “ advanced-cache.php does not exist
echo “Create it by copying $wp_cache_file to $wp_cache_link on your server
a) Add an opening quotation mark before "C:\"
b) Replace all "\" with "\\" or "/"
Don’t forget to install either our XCache or eAccelerator plugins to speed up the stuff that WordPress Super Cache doesn’t cache, such as logged-in users’ visits and comment processing, etc. as well as visits by people who have commented (see below).
WordPress Super Cache doesn’t cache the blog homepage. We’ve contacted the author (Donncha) and expect to get this fixed soon – it is not specific to Windows hosts.
- The non-Super Cache code (basically, caching for users who have commented) does not work for posts. This is a known bug in the WP-Cache code that WordPress Super Cache is using as a second caching layer, and there is no way around it at the moment. Don’t worry, posts are still being cached, just not for people who post a comment. Make sure you’re using the XCache plugin to avoid this being a bottleneck.