Meta tags:
description= Pantheon has long been hosting Drupal sites, and their entry into the WordPress hosting marketplace is quite welcome. For the most part, hosting WordPress sites on Pantheon is a dream for developers. Their command line tools and git-based development deployments, and automatic dev, test, live environments (with the ability to have multiple dev environments on some…;
Headings (most frequently used words):
on, wordpress, tips, dev, test, and, uploads, lots, of, mark, about, for, hosting, pantheon, post, navigation, thoughts, git, powered, deployments, command, line, deployment, to, live, keep, databases, fresh, no, caching, plugins, special, wp, config, php, setup, problems, sometimes, notices, cause, segfaults, have, your, own, share, this, related, leave, comment, cancel, reply,
Text of the page (most frequently used words):
you (27), wordpress (24), the (22), #pantheon (19), and (19), _env (18), this (17), for (17), define (14), site (10), dev (10), your (9), test (9), mark (8), have (8), php (8), like (8), that (8), can (8), just (7), with (7), live (7), cache (6), hosting (6), from (6), #uploads (6), www (6), redis (6), age (6), terminus (6), now (5), error (5), don (5), but (5), their (5), them (5), not (5), some (5), clear (5), yoursite (5), env (5), content (4), tips (4), out (4), segfaults (4), code (4), config (4), files (4), http (4), host (4), environments (4), want (4), things (4), git (4), log (3), com (3), caching (3), jaquith (3), share (3), new (3), let (3), handler (3), errors (3), something (3), function (3), they (3), issue (3), get (3), first (3), line (3), has (3), filesystem (3), one (3), those (3), into (3), database (3), are (3), site_server (3), urls (3), all (3), home (3), stuff (3), minutes (3), control (3), varnish (3), yourenv (3), cli (3), deploy (3), bar (2), post (2), sign (2), subscribed (2), subscribe (2), other (2), comment (2), blog (2), page (2), development (2), april (2), 2015 (2), facebook (2), opens (2), window (2), know (2), own (2), trouble (2), still (2), modify (2), file (2), disable_pantheon_error_handler (2), does (2), isset (2), what (2), going (2), cause (2), hours (2), about (2), more (2), month (2), problems (2), keep (2), crops (2), would (2), plugin (2), lots (2), need (2), appropriate (2), environment (2), db_name (2), db_user (2), db_password (2), db_host (2), auth_key (2), secure_auth_key (2), logged_in_key (2), nonce_key (2), auth_salt (2), secure_auth_salt (2), logged_in_salt (2), nonce_salt (2), yes (2), set (2), based (2), header (2), cache_host (2), next (2), using (2), object (2), work (2), my_pantheon_varnish_caching (2), false (2), pages (2), is_product (2), pantheon_varnish_max_age (2), seconds (2), caches (2), including (2), when (2), clone (2), called (2), commands (2), remote (2), command (2), deployments (2), sites (2), services (2), menu (2), collapse, manage, subscriptions, view, reader, report, copy, shortlink, privacy, already, account, join, 053, subscribers, reblog, create, website, leave, cancel, reply, best, hosts, 2016, introducing, buddy, companion, solution, navigation, related, loading, any, comments, sets, low, level, stops, bubbling, core, where, likely, lies, use, show, could, blank, write, debug, disable, which, causes, nothing, pantheon_environment, set_error_handler, honestly, here, seen, being, produce, useful, information, logs, had, spend, tracking, down, causing, happens, reliably, given, paths, reproducible, example, weird, ticket, open, custom, handling, until, fixed, suggest, doing, e_notice, sometimes, notices, distributed, makes, trivial, scale, adding, linux, containers, directories, lot, consider, folder, usually, partitioned, start, approaching, 000, directory, mind, count, towards, limit, upload, 1000, recommend, splitting, instead, isn, strained, help, day, gotchas, right, hardcode, values, fill, each, db_port, keys, salts, variables, pretty, cool, huh, there, non, domains, remove, leading, preg_replace, _server, http_host, version, wp_home, wp_siteurl, setting, also, nice, trick, getting, play, beware, issues, break, redirection, between, variants, should, massage, solidified, siteurl, boom, automatically, configured, globals, redis_server, array, port, cache_port, auth, cache_password, apparently, step, needed, update, aren, very, documentation, bit, download, put, its, special, setup, unclear, is_user_logged_in, return, is_home, get_query_var, paged, product, two, elseif, function_exists, 120, absint, public, max, add_action, template_redirect, rid, batcache, total, super, outside, works, invalidating, publish, well, easy, standard, headers, will, obey, plugins, developing, testing, before, goes, make, sure, latest, data, easily, complete, rewriting, workflow, databases, fresh, option, blogname, run, tool, used, giving, access, usage, deployment, push, master, great, add, repo, github, bitbucket, anywhere, else, deploying, simple, powered, good, long, been, drupal, entry, marketplace, quite, welcome, most, part, dream, developers, tools, automatic, ability, multiple, tiers, powerful, justify, expense, cheap, encourage, check, twitter, consulting, tempus, fugit, digital, hub, links, online, presences, markjaquith, provider, personal, publishing, platform, lead, developer, freelance, close, search, thoughts, primary, skip,
Text of the page (random words):
tips for hosting wordpress on pantheon mark on wordpress skip to content primary menu mark on wordpress thoughts on wordpress search for close menu home wordpress services about hi i m mark jaquith a provider of freelance wordpress services and a lead developer of the wordpress personal publishing platform this is my blog for all things wordpress go to my digital hub at markjaquith com for links to my other online presences mark jaquith tempus fugit mark on wordpress wordpress consulting twitter tips for hosting wordpress on pantheon pantheon has long been hosting drupal sites and their entry into the wordpress hosting marketplace is quite welcome for the most part hosting wordpress sites on pantheon is a dream for developers their command line tools and git based development deployments and automatic dev test live environments with the ability to have multiple dev environments on some tiers are powerful things if you can justify the expense and they re not cheap i would encourage you to check them out first the good stuff git powered dev deployments this is great just add their git repo as a remote you can still host your code on github or bitbucket or anywhere else you like and deploying to dev is as simple as git push pantheon dev master command line deployment to test and live pantheon has a cli tool called terminus that can be used to issue commands to pantheon including giving you access to remote wp cli usage you can do stuff like deploy from dev to test terminus site deploy site yoursite env test from dev cc or from test to live terminus site deploy site yoursite env live from test clear out redis terminus site redis clear site yoursite env yourenv clear out varnish terminus site clear caches site yoursite env yourenv run wp cli commands terminus wp option get blogname site yoursite env yourenv keep dev and test databases uploads fresh when you re developing in dev or testing code in test before it goes to live you ll want to make sure things work with the latest live data on pantheon you can just go to workflow clone and easily clone the database and uploads called files on pantheon from live to test or dev complete with rewriting of urls as appropriate in the database no caching plugins you can get rid of batcache w3 total cache or wp super cache you don t need them pantheon caches pages outside of wordpress using varnish it just works including invalidating urls when you publish new content but what if you want some control well that s easy just issue standard http cache control headers and varnish will obey php function my_pantheon_varnish_caching if is_user_logged_in return age false home page 30 minutes if is_home get_query_var paged 2 age 30 product pages two hours elseif function_exists is_product is_product age 120 if age false pantheon_varnish_max_age age function pantheon_varnish_max_age minutes seconds absint minutes 60 header cache control public max age seconds add_action template_redirect my_pantheon_varnish_caching and now some unclear stuff special wp config php setup some things just aren t very clear in pantheon s documentation and using redis for object caching is one of them you ll have to do a bit of work to set this up first you ll want to download the wp redis plugin and put its object cache php file into wp content update apparently this next step is not needed next modify your wp config php with this redis if isset _env cache_host globals redis_server array host _env cache_host port _env cache_port auth _env cache_password boom now redis is now automatically configured on all your environments setting home and siteurl based on the http host header is also a nice trick for getting all your environments to play but beware yes www and no www issues so as to not break wordpress redirection between those variants you should massage the host to not be solidified as the one you don t want for non www domains remove leading www site_server preg_replace www _server http_host you re on your own for the yes www version set urls define wp_home http site_server define wp_siteurl http site_server so those environment variables are pretty cool huh there are more database define db_name _env db_name define db_user _env db_user define db_password _env db_password define db_host _env db_host _env db_port keys define auth_key _env auth_key define secure_auth_key _env secure_auth_key define logged_in_key _env logged_in_key define nonce_key _env nonce_key salts define auth_salt _env auth_salt define secure_auth_salt _env secure_auth_salt define logged_in_salt _env logged_in_salt define nonce_salt _env nonce_salt that s right you don t need to hardcode those values into your wp config let pantheon fill them in appropriate for each environment for you and now some gotchas lots of uploads lots of problems pantheon has a distributed filesystem this makes it trivial for them to scale your site up by adding more linux containers but their filesystem does not like directories with a lot of files so let s consider the wordpress uploads folder usually this is partitioned by month on pantheon if you start approaching 10 000 files in a directory you re going to have problems keep in mind that crops count towards this limit so one upload with 9 crops is 10 files 1000 uploads like that in a month and you re in trouble i would recommend splitting uploads by day instead so the pantheon filesystem isn t strained a plugin like this can help you do that sometimes notices cause segfaults i honestly don t know what is going on here but i ve seen e_notice errors cause php segfaults being segfaults they produce no useful information in logs and i ve had to spend hours tracking down the code causing the issue this happens reliably for given code paths but i don t have a reproducible example it s just weird i have a ticket open with pantheon about this it s something in their custom error handling until they get this fixed i suggest doing something like this in the first line of wp config php disable pantheon s error handler which causes segfaults function disable_pantheon_error_handler does nothing if isset _env pantheon_environment set_error_handler disable_pantheon_error_handler this just sets a low level error handler that stops errors from bubbling up to php core where the trouble likely lies you can still use something like debug bar to show errors or you could modify that blank error handler to write out to an error log file have your own tips do you have any tips for hosting wordpress on pantheon let me know in the comments share this share on x opens in new window x share on facebook opens in new window facebook like loading related april 13 2015 april 15 2015 mark jaquith development pantheon php wordpress post navigation introducing cache buddy a companion for your wordpress page caching solution the 4 best wordpress hosts of 2016 leave a comment cancel reply δ create a website or blog at wordpress com comment reblog subscribe subscribed mark on wordpress join 1 053 other subscribers sign me up already have a wordpress com account log in now privacy mark on wordpress subscribe subscribed sign up log in copy shortlink report this content view post in reader manage subscriptions collapse this bar d
|