2012年12月1日星期六

WordPress.com vs. Self-Hosted WordPress – What You Need To Know


WordPress.com vs. Self-Hosted WordPress – What You Need To Know

April 17, 2012  | 
42 Comments
WordPress.com vs. Self-Hosted WordPress - What You Need To KnowWhen I was first starting out with WordPress, I was rather confused by the fact that there seemed to be two versions. I had previously built websites from scratch with Notepad and a FTP client, so the world of content management systems was new to me. And before I had even started – before I even had a particularly good understanding of what WordPress actually was – I had to make a choice.
If I am honest with you, I don’t think there is a particularly good comparison piece between WordPress.com and self-hosted WordPress out there. In fact, I don’t think that even WordPress.com does a particularly fair job of comparing the two options (we’ll get into why later). So I thought I would take this opportunity to give you my opinion on the differences between WordPress.com and self-hosted WordPress, so that you can make a more informed decision as to which option to take.

What Is The Difference?

In my opinion, the main issue when deciding whether to choose WordPress.com or self-hosted WordPress is having a true understanding of the structural difference.
The best analogy I can think of to make clear the differences between WordPress.com and self-hosted WordPress is that of computers. Self-hosted WordPress is the equivalent of buying your own PC. It is yours to do with as you wish – you can add components, install software, browse the internet unrestricted – the world is your oyster. Meanwhile, WordPress.com is the equivalent of using a library computer. You’re operating within a controlled environment. You do not have the same freedom as you would have with your own PC.
That, in a nutshell, is the main difference. WordPress.com is restricted – self-hosted WordPress is not.

So Why Bother With WordPress.com?

If you are happy to work within the restrictions, you can have a site up and running at no cost – the same cannot be said for self-hosted WordPress. But that’s not all – WordPress.com offers some additional features that do not come as standard with self-hosted WordPress. For someone who only has a very casual or tentative interest in web publishing, WordPress is a great starting ground. Sign up, log in, and get posting.
But in this author’s humble opinion, WordPress.com is not a viable long-term solution for most people looking to take anything more than a casual interest in blogging.

Pros and Cons

At this stage it would be pertinent to take a closer look at how WordPress.com and self-hosted WordPress differ. First of all, it is important to note that on a macro level, they are one and the same. They are based upon the same piece of software. But whilst self-hosted WordPress just hands over the keys and lets you drive, WordPress.com packages the software up in a somewhat restrictive way, then gives you control of what is left.
Here is a rundown of what WordPress.com has to offer over self-hosted WordPress, straight out of the box:
  • Free hosting (up to 3gb)
  • Automatic backups
  • Automatic upgrades
And here are some of the restrictions of the WordPress.com platform:
  • No custom themes or plugins
  • No PHP/CSS customization
  • Monetization (through advertising, affiliate links, etc) is not allowed
  • WordPress.com will run their own advertising on your site
  • No custom analytics
Here is a rundown of what self-hosted WordPress has to offer over WordPress.com:
  • Unrestricted theme and plugin uploads
  • Complete control over your site
And the downsides of self-hosted WordPress:
  • You will need to pay for a domain and hosting

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
FIND OUT MORE

Myths Dispelled

There seem to be certain false preconceptions about both WordPress.com and self-hosted WordPress, and I would like to take this opportunity to dispel them.

1. WordPress.com is a Charity

WordPress.com is a commercial enterprise like any other. They offer a free service in the hope that you will eventually pay for premium features.
You could spend $17 on domain mapping, $20 on extra hosting, $30 on basic design customization, and $30 to remove advertisements. Before you know it you’ve forked out close to $100, and you’ve just done a bad job of emulating a self-hosted WordPress installation that would have cost you about $70 (for a year).

2. Using Self-Hosted WordPress Requires Mad Skills

You do not need to be a technical genius to use self-hosted WordPress. Here’s what the two interfaces look like:
WordPress.com
WordPress.com
Self-hosted WordPress
Self-hosted WordPress
In what way is self-hosted WordPress supposed to be more complicated?
The fact is, it is barely any more difficult to set up a self-hosted WordPress site than it is one on WordPress.com. Buy a domain and hosting, install WordPress with the one click install process found on any reputable hosting provider. A quick search on Google will tell you everything you need to know. Yes, one could argue that WordPress.com is more straightforward for the completely uninitiated, but the gap is not nearly as wide as some make it out to be.
My favorite way of proving the simplicity of getting started with self-hosted WordPress is this four minute video from Pat Flynn of Smart Passive Income. It takes him a total of four minutes to purchase a domain and hosting, install WordPress, and write a post.

3. Self-Hosted WordPress Costs Money

Self-hosted WordPress is open source and completely free. It is the domain name and hosting that costs you money. That’s $10 for the domain for a year from GoDaddy or NameCheap, and $5 per month for hosting from BlueHost or HostGator. So an outlay of around $70 for a year. Even if blogging is just a hobby, that’s the cheapest damn hobby I can think of.

Which Is For You?

I am clearly an exponent of self-hosted WordPress, but that does not mean I have anything against WordPress.com. I just feel that there is a far better solution for the vast majority of people.
And of course, we are huge fans of custom themes and plugins here at WPMU.org – which are not allowed by WordPress.com. If you are new to the world of WordPress, you probably do not yet understand the sheer scope of what you would be missing out on by going with WordPress.com.
But ultimately it is up to you. If you want a simple, free and limited service to build your own basic blog, WordPress.com is arguably the best service of its type. You get free hosting, free backups, and a user-friendly interface with which you can start blogging in minutes. But if you want to unleash the full power of WordPress, there really is only one option.
Creative Commons image courtesy of TheBusyBrain

Related posts:
  1. Offer Automatic Updates for Plugins and Themes Hosted Outside WordPress Extend Have you written a plugin or theme that you’d like to offer automatic updates for? Maybe you prefer to host...
  2. Gravatar Hovercards Plugin Now Available for Self-Hosted WordPress and BuddyPress Sites You thought they were super cute when they became available for WordPress.com users. Now self-hosted WordPress sites can take advantage...
  3. WordPress News: Gravatar Hovercards Coming Soon for Self-Hosted WordPress Blogs You may have seen the announcement today that WordPress.com is now sporting Gravatar Hovercards. The new Hovercards show additional information...
  4. Warning: Your iPhone or Mac Mail May Be Killing Your Website I recently discovered something very important for WordPress sites hosting with Hostgator’s shared option and I wanted to share it...
  5. How To Transfer A WordPress Site From One Server To Another With ManageWP Confused by the whole website transfer process? It only takes a few minutes once you know how....

2012年11月25日星期日

Installing WordPress with MAMP on Mac OS X


Installing WordPress with MAMP on Mac OS X

This is an absolute beginners tutorial on how to get yourself a local WordPress development environment set up on your Mac OS X with MAMP. Step by step (and with screenshots,) we’ll go through each part of the process — downloading and installing MAMP, basic MAMP configuration, creating a MySQL user and database, getting WordPress up and running, and in the end I’ll share some tips you might find useful in your WordPress journey.

What is MAMP and why MAMP?

WordPress is not a stand-alone application. In order to work, it requires a special set of server software that your hosting company will typically provide for you, but such software is not pre-installed on your local Mac. This means that in order to run WordPress locally, you would need to install and configure the set of software yourself, but luckily there’s MAMP!
MAMP is a stand-alone application for Mac OS X which brings server power to your home or office desktop or laptop. It bundles the typical software stack you’d need to run all sorts of web applications including WordPress; that is the Apache web server, a MySQL database server and a PHP interpreter. As you might have noticed, those three are the “AMP” part. The first “M” stands for Macintosh, or as we call it nowadays — Mac.

Installing MAMP

If you’re a Mac user, you’ve probably gone through the process of installing new software in OS X, and MAMP is not too different. Let’s browse to the MAMP website and get ourselves the latest copy of the software. It’s usually bundled with MAMP PRO trial (a commercial and more advanced) version, but we’ll be using the free version which is enough to get you started.
Download MAMP
Once the download is complete (over a hundred megabytes,) extract the contents of the archive somewhere, your desktop is a good place. You’ll see that it contains a MAMP.pkg package which you can run. You’ll be greeted with a user-friendly installer where you’ll have to keep hitting Continue to get through each step.
Note that during the Installation Type step, you can hit Customize and uncheck MAMP PRO which would skip the trial commercial package.
Installing MAMP
After MAMP has been installed, you can launch it using the Applications tab in your dock or by searching for MAMP in Spotlight. Note that when starting and stopping services and changing the configuration, MAMP may ask you for your password, which is required to make system changes in OS X.
MAMP Configuration Password
The Status section on the left will show you when the Apache and MySQL services are started or stopped. After changing any configuration, you might need to restart the servers for your changes to take effect.

Configuring Apache & MySQL Ports

This step is quite important. By default MAMP sets non-default ports for Apache and MySQL in order to avoid possible conflicts with other running applications, so unless you’re using some software that occupies the default ports, it would be nice to change them. Apache to port 80 and MySQL to port 3306.
Use the Preferences button, and then the Ports tab to make the necessary changes. MAMP will have to restart your servers for the changes to take effect.
MAMP Ports Setup
Now while you’re at the MAMP preferences, hit the Apache tab to be able to select a directory root. This is like the public_html folder on your web hosting server, but a local one. That’s where you will install WordPress and store all your project files. A folder in your Documents is a good place to start. I’ll call itmy_document_root.
To make sure everything is working correctly, let’s create a new PHP file in the directory we just set as our document root. Call the file index.php and have its contents say something simple:

Then get your web browser to point to localhost and if you’re lucky enough you’ll see the PHP info page that looks like this:
phpinfo with MAMP
Hurray, now delete that file and let’s get a MySQL database ready for WordPress.

Creating a MySQL Database for WordPress

Now, before installing WordPress we need a database where it would store its data and settings. MAMP ships with a database manager application called phpMyAdmin and the WordPress Codex has a guide on how to create a database with that, but let’s take a shortcut here and fire our Terminal in OS X. You can find it in your Applications folder or easier, through Spotlight.
Spotlight Terminal
The Terminal is a command line utility to your Mac, sort of what you might have heard about Linux, DOS and so on.
Terminal in OS X
If you’re planning to become a kick-ass WordPress developer, you’re going to have to learn this tool. We’ll type in a few commands (which you can easily copy and paste) that will connect to your local MySQL server, create a new database for WordPress and then create a new MySQL user with access to that database. Ready?
mysql -uroot -proot
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO wp@localhost IDENTIFIED BY 'hello';
EXIT;
Don’t get too scared yet, it’s quite simple if you understand what each command does. The first one connects to our local MySQL server using root as the username (the -u argument) and root as the password (the -p argument.) These are the default settings in MAMP. Note that there is no space character between arguments and their values. If that gives an error, you should explicitly tell Terminal where the MySQL binary is (where you installed MAMP,) in my case it’s:
/Applications/MAMP/Library/bin/mysql -uroot -proot
If everything’s correct, the first command will open a MySQL command line (in the same Terminal window) to which you type in the rest of the commands or as they’re called SQL queries. The first query (second command) is straightforward — it will create a new database called wordpress and the second query will grant all possible privileges (read, write, delete, etc.) on every table in the wordpress database, to the wp user originating from localhost identified by the hello password.
The third query exits the MySQL shell, at which point you no longer need Terminal so feel free to close it. Here’s a screenshot from my Terminal to make sure you’ve done everything right:
MySQL Terminal
As you might have guessed, the bolded words in the paragraphs above are the values we’re going to use when setting up WordPress, so we’re really close now!

Installing WordPress

Okay, I assume you already know where to get the latest version of WordPress. Download the ZIP archive and extract it to that document root directory. The one where we created our index.php file, remember? Note that the archive might (and probably will) extract an additional folder called wordpress with all the WordPress files inside. Feel free to move all the contents of that folder back to your document root and then delete the empty WordPress folder.
WordPress Contents in Finder
Now, open your browser and point your web browser to localhost again. This should bring up the WordPress welcome page and then on to your database settings, which you probably are familiar with already.
WordPress MAMP Database
The database name, username, password fields are the ones we used when creating the user and database, remember? The host field is localhost because MySQL is running on the same computer (your computer) as the Apache web server. The table prefix is up to you. I generally leave it wp_ for local installs.
The rest is pretty straightforward, blog name, admin username, password and e-mail. After having filled those in you’re left with your brand new and empty WordPress installation, on your local machine, running MAMP. Congratulations!

Conclusion

I’d like to end this tutorial with a few short tips you might find useful when working with WordPress locally on MAMP.
  • While MAMP itself is a lightweight application, when working for a long time without turning it off (and without restarting your computer,) it can get a little laggy and use too much memory. Kick it around from time to time.
  • If ever needed, Apache and PHP configuration files are located in MAMP’s conf directory, that’s /Applications/MAMP/conf.
  • Apache and PHP binaries and service scripts are available in MAMP’s bin directory, Apache, PHP and MySQL logs are in the logs folder (duh.)
  • You don’t need MAMP PRO unless you’re 100% sure you do.
Final tip — whenever you become a MAMP ninja, don’t stop there! Your next goal is being able to run a local virtual machine with your favorite Linux distribution linked to your Mac OS X with a network file system or something similar. That would really get you closer to the real world hosting environments, and a better WordPress pro.
Thank you so much for reading, hope you enjoyed it and feel free to ask questions, post comments and come say hi on Twitter too. Cheers and thanks again!

6 thoughts on “Installing WordPress with MAMP on Mac OS X

  1. The first bullet point in the conclusion is so right. After awhile all the Apache processes being created and destroyed constantly will eat away at all your free memory and make your “inactive” memory pool larger than it needs to be.
    Definitely stop the servers processes when you don’t need them.
  2. This -> Whenever you become a MAMP ninja, don’t stop there! Your next goal is to write the best tutorial available on the interwebs about how to run a local virtual machine with your favorite Linux distribution linked to your Mac OS X. :P
    • Steve, honestly I haven’t tried DesktopServer yet, so I can’t really encourage people to use it. For the simplest matter, virtual hosts management is great and awesome, but I don’t want to use .dev domains, so I’d rather do it manually in my /etc/hosts file.
      Frankly, I’m not a big fan of MAMP, XAMPP, LAMP or whatever and I try to constantly push towards VPS, virtual environments and command line tools rather than all in one solutions. I think that one might greatly benefit from being able to work with the command line, install software, use source control, make database backups, configure schedules and so on. But the reason I mentioned MAMP is that it’s something in between which lets you use Apache and MySQL without having to install and configure Linux, which as I mentioned in a comment above, is a tutorial in my roadmap.
      Thanks for stopping by and keep up the good work with DesktopServer! :)
Comments are closed.

2012年11月23日星期五

Codex tools: Log in Installing WordPress Locally on Your Mac With MAMP


Codex

Installing WordPress Locally on Your Mac With MAMP

Contents

[hide]

What is MAMP?

MAMP stands for Macintosh, Apache, MySQL, and PHP. MAMP is an application you can install on your Mac which allows you to have access to a local PHP server and MySQL server. Essentially, MAMP gives you all of the tools you need to run WordPress on your machine, fordevelopment and testing purposes. You can accomplish this in different ways, but the other ways aren't nearly as simple (seeMacOS_X_Local_Mirror for the long, manual version of installing PHP and MySQL on your Mac).

Step 1: Installing MAMP

Before you can install MAMP on your Mac, you'll need to download it from the MAMP website. MAMP requires that your Mac be running Mac OS X 10.6.6 or later.
Once the MAMP download is complete, double-click the MAMP disk image (it should be something like MAMP_2.0.3.dmg), and you should get a MAMP window pop up. Drag the MAMP folder (not MAMP PRO - we'll save that walk-through for another time) to the Applications folder.

Step 2: Basic MAMP Settings

Now that you've got MAMP installed on your system, launch MAMP.app (located at /Applications/MAMP/MAMP.app).
While you're editing settings, MAMP might prompt you for an administrator password. This is required because MAMP needs to run two processes: mysqld (MySQL) and httpd (Apache), and depending on the settings you set for those processes, you may or may not need to input your password.
Once you open MAMP, click the Preferences button. Next, click over to "Ports." The default MAMP ports are 8888 for Apache, and8889 for MySQL. If you use this configuration, you shouldn't get asked for your password, but you'd need to include the port number in the URL (localhost:8888). If you'd like to leave the port number out of the URL, change the Apache port to 80. The downside of using port 80 as your MAMP Apache port is that you'll always be asked for your password.
On the PHP tab, select PHP version 5. The PHP minimum requirement for WordPress was raised to 5.2.4+ in version 3.2.
Lastly, on the Apache tab, you'll need to set a document root. This is where all of your files are going to be for your local web server. An example of a document root is /Users/USERNAME/Sites/wordpress/.
Once you're done editing all of the settings, hit OK to save them.

Step 3: Starting MAMP Servers & Creating The Database

To start the MAMP Apache and MySQL servers, simply click "Start Servers" from the main MAMP screen. Your MAMP servers have now been started.
Once the MAMP servers start, the MAMP start page should open in your default web browser. If not, click on "Open start page" in the MAMP window. Once that's open, select phpMyAdmin from the webpage.
Under "Create new database", enter in a database name such as "wordpress", and press "Create."

Step 4: Downloading and Installing WordPress

Now it's time to download WordPress. Once you've downloaded and unzipped the WordPress download, open up the "wordpress" folder. Click and drag all of the files from the wordpress folder to your MAMP document root (I use/Users/USERNAME/Sites/wordpress/).
Lastly, we've got to run WordPress' famous 5-minute install. Visit your local site (localhost:port or localhost:port/wordpress), and enter the following information into the database setup form:
database name: wordpress
database host/server: localhost
database user: root
database password: root
Once that's complete, enter a blog name and email address, and you're ready to use WordPress on your Mac.