Wordpress For Mac Os X



Apple has released iCloud for Mac OS X Lion as well as iCloud in iOS5. I’m not exactly going to write an article here. I’m going to lay it out as simply as it can be laid out. Screenshots and lists are all you people want to see anyway, so here we go.

WordPress Widget for Mac Free Onemac.net Mac OS X 10.4 Intel/PPC, Mac OS X 10.5 Intel/PPC, Mac OS X 10.6/10.7/10.8 Version 1.0 Full Specs Download Now Secure Download. If you want to install WordPress on Mac OS X, you are always advocated using a local server environment setup tool, such as MAMP or XAMPP. In another guide, we have introduced the free web server package MAMP for Mac with steps to install WordPress on Mac OS X with MAMP. A desktop app that gives WordPress a permanent home in your taskbar. Download the app: Also available for: Mac OS X (10.9+) Windows (7+) Linux (.tar.gz) Linux (.deb).

iCloud in iOS5 & OS X Lion

iCloud is fully integrated into anything you do on your iDevice that has to do with your Contacts, Calendars, Mail Accounts, Bookmarks and other information. Apple did this right and gave us all of this functionality for the good price of, FREE.

How to start and stop the Apache HTTP Server

  1. Go to: System Preferences -> Sharing
  2. To start the server, select Web Sharing. To stop the server, unselect it.

Install MySQL

  1. Download MySQL for Mac OS X. For my computer, I used the package format for Mac OS X 10.5 (x86).
  2. Verify package integrity using MD5 checksums or GnuPG.
  3. Follow the instructions for installing MySQL on Mac OS X. I recommend installing both the MySQL Startup Item and preference pane as well. These will make it possible to have MySQL start automatically during system startup and enable you to start and stop the MySQL server with a click of a button.
  4. Post-installation setup and testing.

Enable PHP

Mac OS X comes with the Apache HTTP Server and PHP installed. The PHP module needs to be enabled.

Find the location of httpd.conf, the main configuration file for the Apache HTTP Server, using the command, httpd -V.

Note: The $ at the beginning of the lines in the following examples is the command prompt.

$ httpd -V | grep SERVER_CONFIG_FILE
-D SERVER_CONFIG_FILE='/private/etc/apache2/httpd.conf'

Beware. Proceed only if you know what you are doing. I expect that you have the technical ability of a software developer familiar with Unix.

Edit the httpd.conf file using root access with the sudo command and your favorite text editor. I use vi.

$ sudo vi /private/etc/apache2/httpd.conf

WordpressWordpress For Mac Os X

Uncomment the line:

# LoadModule php5_module

Save the file and exit.

Start the HTTP server and test that PHP is running by creating a file in your Web directory containing a call to the function phpinfo().

File: /Users/<username>/Sites/test.php

<?php phpinfo(); ?>

Navigate to the URL, http://localhost/~username/test.php .

Change MySQL socket

If you were to try to install WordPress now, you would probably run into this error:

Error establishing database connection

This error occurs because the PHP build that comes installed on Mac OS X (Leopard) is configured to look for the MySQL socket at /var/mysql/mysql.sock. In the current release of MySQL, the default socket is at /tmp/mysql.sock. Here is how to fix this.

Find the PHP configuration file path from the call to phpinfo() from earlier. It is probably /etc and this location is probably a symbolic link to /private/etc.

Create a php.ini file if it doesn’t already exist by copying the default configuration file, php.ini.default, using root access with the sudo command. Give the root user write permission on the file.

Wordpress

$ cd /private/etc
$ sudo cp php.ini.default php.ini
$ sudo chmod +w php.ini

In php.ini, edit the two lines for the parameters mysql.default_socket and mysqli.default_socket to be:

mysql.default_socket = /tmp/mysql.sock

mysqli.default_socket = /tmp/mysql.sock

Save the file and exit.

Enable .htaccess

If you want to use pretty permalinks in WordPress, you need to enable .htaccess. Otherwise you will see this error:

404 Not Found: The requested URL <URL> was not found on this server.

Edit the Apache configuration file to allow override. If you are using your Sites Web directory:

$ sudo vi /private/etc/apache2/users/<username>.conf

Find AllowOverride and change its value from None to All.

AllowOverride All

Save the file and exit.

Start Apache HTTP Server

Now that you have enabled PHP and .htaccess, restart the HTTP server.

Download and extract WordPress

Wordpress for mac os x 10.10

Download and extract WordPress. To have WordPress automatically configure wp-config.php, before you proceed with Step #3 of the WordPress installation instructions, set the file permissions as follows.

Set file permissions

On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files. I do not know if there are any security issues with this. If you are more knowledgeable than I am on this matter, please chime in!

Updated February 17, 2010. My preferred way to do this is to change the group of the wordpress directory and its contents to _www and give write permissions to the group. Keep the owner as your <username>.

$ cd /Users/<username>/Sites
$ sudo chown -R <username>:_www wordpress
$ sudo chmod -R g+w wordpress

However, when I tried this, it did not work for automatic upgrades to newer versions of WordPress although it worked for automatically updating the .htaccess file for pretty permalinks. End of update.

Local

Another way to do this is to change the user of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.

$ cd /Users/<username>/Sites
$ sudo chown -R _www wordpress
$ sudo chmod -R g+w wordpress

With both of these methods, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.

Wordpress For Mac Os X 10.8

For reference, the Apache configuration file, httpd.conf, contains entries for the User and Group which the server will run as. The default setting is www for both.

For reference, on Mac OS X (Leopard), the user account information is located in the file:

/private/var/db/dslocal/nodes/Default/users/_www.plist

This file shows that the _www and www name map to the same user account.

Install WordPress

Now resume the steps for installing WordPress. If you did not change the file permissions, you will need to edit the wp-config.php file yourself instead of having WordPress create it automatically.

Follow Symbolic Links

In some Apache server configurations, mod_rewrite requires FollowSymLinks to be enabled. Otherwise you might see this error:

403 Forbidden: You don’t have permission to access <URL> on this server.

Add this line to the top of your .htaccess file:

Options +FollowSymlinks

All done!

References

  • Directory and File permissions. WordPress Support forum.
  • When do I need Options +FollowSymLinks?Webmaster World forum.

Wordpress Mac Os

Respond

Mamp Wordpress Mac Os X

Please let me know if you find any errors or have anything to add.





Comments are closed.