If you’re in Baltimore and are a developer, or if you are in Baltimore and know someone who is a developer… Heck, if you’re in DC and are a developer or know a developer, we need you. (You can be to work in under an hour on the MARC train).
Some of you know what I do and who I do it for. I work for a company that has consistently been rated in the top 3 companies to work for. We’re fun and relaxed and our content producers focus on publishing in the financial industry.
Dogs are regularly in the office. We wear shorts and sandals to work. It’s an a-political group – as in office politics. Everyone works well together from the execs down to customer service.
We believe in “Fail cheap and quick” as a lean startup sort of mentality and everyone is empowered to just try stuff if it makes sense.
What *I* do is build awesome web technology to support the business. Plenty of WordPress but now we’re building out huge APIs for reporting and consumer-facing tools. And that’s not WordPress. That’s Laravel and MVC, if you’re curious.
We are looking to add another developer with real chops. PHP, JS, REST APIs, SQL for now with NoSQL as a viable thing for the future. We largely operate on Rackspace and Amazon EC2.
I’d love to hear from you or your developer friend. Send me your resume and cover letter but let me see your github as well!
Today, I went about setting up a local WordPress install for some development I am doing at work. The problem that existed is that I didn’t want to bring the database from the existing development server site into my local MySQL instance. It’s far too big. I figured this could be done via an SSH tunnel and so, I set abut trying to figure it out. The situation worked flawlessly and so, for your sake (and for myself for the future), I give you the steps.
Setting up the SSH Tunnel
I run a local MySQL server and that runs on the standard MySQL port 3306. So as these things go, I can’t bind anything else to port 3306 locally. I have to use an alternate port number. I chose 5555, but you can use whatever you want.
the -N flag means that when connecting via SSH, we are not going to execute any commands. This is necessary for tunnelling as, we literally, will not execute any commands on the remote server. Therefore, we won’t get a command prompt.
the -L flag tells SSH that we are going to port forward. The following portion, 5555:127.0.0.1:3306 combined with the -L flag means, literally, forward all traffic on localhost (127.0.0.1) connecting on port 5555 to the remote server’s port 3306 (standard MySQL listening port).
The remote server and ssh connection is handled by email@example.com. This seems obvious, but just in case. You may be prompted to enter your SSH password.
The final part can be omitted, but I like to keep it there so I know what’s happening. The -vv flag tells the SSH daemon to be extra verbose about what is happening with the connection. It’s sort of a good way to debug if you need to, and to know that the port forwarding is actually taking place.
Configuring WordPress to use the Tunnel
Now that we have a successful SSH tunnel, you have to configure WordPress to use it. In the wp-config.php file, simply modify the DB_HOST constant to read:
You need to add two more variables, though, to override WordPress’ existing siteurl and home options to allow you to work with the localhost domain, instead of redirecting to the remotedomain.com that is configured in WordPress.
With these configurations in place, loading up WordPress should now load in the database content from the remote host and you can get to work on local development. Word to the wise… don’t close the terminal window with the tunnel or the tunnel will be severed. If you have to minimize it so it’s not annoying you, go for it… just don’t close it.
For 7 years, I’ve been publishing these articles every time a new version of WordPress comes out. Since version 2.0. It’s been a long run. It began as a need to fill people in about new features in WordPress (and there were a lot in 2.0). There wasn’t anybody doing these at the time, and certainly WordPress wasn’t nearly as popular as it is now (22% of the internet is powered by WordPress).
But many more people have stepped up in recent releases and have started updating readers with new features and expectations. My job here is done. I’m passing the baton but really the baton has already been passed and I’m happy about that. This will be my final 10 things article. Thank you for sticking around and following along all these years.
On Wednesday (likely), December 5th, WordPress 3.5 will drop with all it’s gooey goodness. A BIG shoutout needs to go out to Andrew Nacin, the lead developer on 3.5, for project managing this release while also planning his wedding, and to his best man, core developer Daryl Koopersmith for leading the media efforts. And of course, all the other core contributors to this release (I, sadly, am not one this cycle).
So without further adieu, let’s get into the guts of 3.5.
One of the most anticipated revamps in WordPress history has finally arrived. Since the days of implementing the media upload integration, core developers, users and everyone in between has cried for a new way of managing media. It’s finally here and it is one of the biggest undertakings in WordPress core development history.
The new media manager in WordPress 3.5 simplifies the process of uploading various media formats (usually, but not limited to, images). Everything is right up front and easy to understand. Instead of having cryptic icons over top of the edit area on a post editing screen, you now have an obvious “Add Media” button.
Clicking Add Media brings up a dialog that has a very large, and obvious “drop zone” where you can drag and drop files into. This aspect has actually been around for a few versions, but now it’s a much smoother experience. Of course, you can also click the prominent “Select Files” button in the drop zone to pull up a more traditional dialog for selecting those media files and uploading.
You can also get a much more intuitive view of your already uploaded media attachment, select any number of photos and insert them into a post or create a gallery. This was all supported before, but the logical workflow makes the process a million times easier.
Also, gone are the days of uploading an image, having to close the media dialog to then re-open it to create a gallery or futz around with details for each image. This was always kludgey before. You could assign an image as a featured image without having to close the dialog, but then inevitably you’d end up in a situation where the dialog had to be closed to get into another image mode.
I’m really curious what the reaction to this feature will be.
Twenty Twelve is the new theme that is coming with 3.5 A few cycles ago, the core team decided to retire the old default “Kubrick” theme and release a new standard theme once a year. Twenty Ten came in 2010. Twenty Eleven came in 2011 and, well, obviously, Twenty Twelve is dropping in at the tail end of 2012.
Twenty Twelve is a fun theme. It’s fully responsive, so it conforms to different viewport sizes – monitors, iPads, smart phones, etc. In WordPress 3.4, the Admin got responsive love, and now the default theme gets it as well.
You can actually download and install it now, as it is also compatible with WordPress 3.4 and is on the theme repository.
This default theme has better typography, a home page template, various options for columns and widgeted areas and would serve well as a handy theme framework for child themes as well.
In addition, if you haven’t started leveraging post formats (available since WordPress 3.1), you can do that now with Twenty Twelve. The theme has built in styling defaults the match the sort of thing you’d expect from Post Formats (to me, still one of the most neglected things in WordPress)
HiDPI “Retina” Admin
For those of you on the retina display bandwagon, both Twenty Twelve and the entire administrative interface are all retina ready. No pixelation on those high-end Macs!
In WordPress 3.4, the first steps were made by providing quite a few retina (or hi-def, if you will – it will make more sense in a minute why I offer that clarification) icons in the admin. Now, the CSS (specifically for print) also supports this hi-def rendering. If you must print a tree, the print stylesheets will be printing in hi definition.
This also opens up opportunity as browsers and CSS3 continue to advance and provide developers with new tools.
Retina not only gives print versions additional clarity, and those high end Macs more beauty, but it also renders things better for you iPhone 5, iPad 3, Kindle HD and various new Android device users. Rejoice! (but I have an iPhone 4S, so meh!)
Removing the Links Manager
Oh my God. We finally got rid of this antiquated thing!
Remember back in the day when people actually kept blogrolls? And WordPress had this feature in the menu called “Blogroll”. And then people started realizing, as possibly one of the earliest turns toward WordPress not being only a blogging tool but also a full-blown Content Management System, that Blogroll just didn’t seem appropriate (or whatever the thinking was), so it was renamed to Links.
It’s now coming out entirely. Existing WordPress install retain the Links manager but new WordPress 3.5 installs no longer have this functionality.
If you still need it, you can install the Links Manager as a plugin.
As a developer, I am constantly setting up WordPress installs, setting up new WordPress installs, resetting WordPress installs, etc. so perhaps my favorite new feature in WordPress 3.5 is the “Favorite Plugins” doohickey. I always have a subset of plugins I use for development and functionality I consider a “must have” for a client project, etc.
If you go to the WordPress plugin repo (and are logged in with your WordPress.org username), you will see a new “Favorite” button on every plugin page.
This becomes incredibly useful in WordPress 3.5 where you can now pull down your favorite plugins with one-click install. When you visit the Plugins > Add New admin page, you will see a new “Quick Link” along side the “Upload”, “Popular” and other links that have been there all along. Now you just have a new menu.
This brings up a page where you can enter your WordPress.org username and get a list of all the plugins you’ve favorited on the plugin repo and install as you need.
Protip: Now you can stop emailing me and asking me what plugins I recommend. Enter MY username – technosailor – and find out which plugins I prefer.
Tumblr Importer Support
One of the most popular blog types and platforms in the past few years is Tumblr. Up until now, there hasn’t been a way to get Tumblr content imported into WordPress. That’s no longer the case.
On the Settings > Import page, you can now activate Tumblr import support. Warning: The process of importing Tumblr is a little kludgey and that is due to Tumblr’s own systems. You will need to register an app with Tumblr, enter certain key information about your WordPress install into the Tumblr app registration page, and copy certain key information into WordPress.
The instructions are all on the Import admin screen. I suggest opening up the Tumblr app registration page in a separate tab as you’ll have to go back and forth between Tumblr and WordPress.
Once you do this, you can connect WordPress to your Tumblr blog and slurp in all the data you’ve had over there. I know y’all love Tumblr, but this is your opportunity to get off of it and onto a more widely used and customizable platform. Plus, you have Press This in WordPress to allow you to continue your Tumblings.
The Dashboard has always been a bit of a sore spot for new users unfamiliar with WordPress. What is all this information? Unfortunately, that’s not going away quite yet. However, WordPress now makes it easier for users to get up to speed with common things like writing an about page, setting up a theme, etc.
In addition to Dashboard fixes, there have been a number of smaller UI changes in the admin, including the Privacy page being removed and merged into the Reading Settings pages. Lots of effort was put into a simpler user experience.
It’s the little things that help users get up to speed and using WordPress quickly and effectively and reduces the learning curve.
There are a couple of Multisite improvements for developers. For the longest time, well before the merge of WPMU into WordPress, the way developers could switch “context” from one site to another would be through switch_to_blog(). Even after the merge, that function still remained the way to do it. But it has always come at the price of performance and caching. It was an extremely expensive function to use, filled with unnecessary database queries and other fudge.
It left developers looking for ways to accomplish the same task in a different way – which is really not the WordPress way. We encourage developers to use the tools WordPress provides and not to try to get around them. This mentality is almost universal and prevents problems with backwards compatibility in the case of database schema changes, etc. However, this beast had never been tamed for this specific functionality.
As of WordPress 3.5, this function has now been refactored and performs significantly better than what it did, including massive caching changes. Developers should feel far more comfortable using it. Hooray!
Multisite: Sub Directory
Another Multisite improvement is the ability to install WordPress Multisite in a folder. Up until now, WordPress Multisite could not be installed in a subdirectory. It had to be installed in the document root which was… silly.
In WordPress 3.5, a lot of work was put into making it possible to do just that. Specifically, this came out of Hack Day at WordCamp San Francisco in August. Nice work Mark Jaquith and company.
One final developer tool that was added in WordPress 3.5 is a modification to the post__in argument that can be passed to WP_Query to affect what posts are pulled in a custom query/Loop. While post__in has been around awhile, and takes a comma separated list of post IDs to be retrieved, now, if the orderby parameter is set to post__in, the order of the IDs matter. Specifically, the order of the IDs in post__in is the order they are retrieved in the resulting dataset. Before they were simply ordered in numerical order (or whichever custom order parameter was supplied – post_name, post_title, etc) .
This is pretty effective for CMS-style usage of WordPress where a developer may want to have granular control of how specific content pages are listed, displayed, etc.
So that’s it! Nice big release. A lot of under the hood stuff for developers, but really this release is less of a developer’s release and more of a user experience release. When WordPress 3.5 drops on Wednesday (assuming that happens as expected), I’d love to hear feedback.
Thanks for reading all these years. I’m not disappearing. I’m just retiring from this column. Of course, I’m always looking for full-time or consulting work. Please feel free to contact me if you think we might be able to work together.