WordPress Designers and Developers in Minneapolis, MN

How to Set Up Wildcard Domains on Hostgator for WordPress Multi-Site

I ran into an issue on Hostgator today whereby I could not get my sub-domains working in a fresh WordPress multi-site installation.

mydomain.com was working fine, but subsite.mydomain.com was displaying the default Hostgator page.

The issue was that my wildcard sub-domain was pointing to the “/public_html” document root. When I changed that to “/public_html/mydomain.com” everything worked fine.

How to make wildcard domains work with WordPress multi-site on Hostgator

(click image to enlarge) How to make wildcard domains work with WordPress multi-site on Hostgator

I hope this post saves someone in this world from a headache! :)

Thanks, Shawn!

How to Zip a Folder Using Terminal or Command Line

I have been having fun with the command line the last couple of days.  Being a command line noob, I am starting to see why all my geeky friends love working in it.  I used to play around with BASIC back in the day, and the command line has a certain nostalgia about it in addition to being powerfully efficient in many ways.  On to the fun…

I have a rather large BuddyPress + WordPress Multi-site installation that BackupBuddy has been choking on.  All of my uploads total around 600MB, which is more than my server can zip up in one sitting.

So, I decided to try out the command line’s zip functionality, and it worked swimmingly!  Below are the steps I took to zip up my blogs.dir directory (the folder that has all my uploads in it).

Step 1: SSH into your website root via Terminal (on Mac) or your command line tool of choice.

Step 2: Navigate to the parent folder of the folder that you want to zip up using the “cd” command.

Step 3: Use the following command:   zip -r mynewfilename.zip foldertozip/   or   tar -pvczf BackUpDirectory.tar.gz /path/to/directory  for gzip compression
In my case, I typed zip -r blogs.dir.zip blogs.dir/ 

That’s it!

 

How to Update php.ini Via Terminal (Command Line)

Today I needed to increase the file upload limit in a WordPress multi-site + BuddyPress installation.  The limit was set by php.ini on the server, so there was no way to increase the limit within WordPress.

The solution is a bit complex if you are a command line noob like me, and it does require a basic understanding of command line stuff as well as root access to your server.  That said, with some guidance from someone like Dave, you can be rolling on the command line in no time!

Step 1: SSH into your website root via Terminal (on Mac) or your command line tool of choice.

Step 2: Find your php.ini file by typing something like this - grep -i php.ini

Step 3: Make sure you are in the same directory as your php.ini file and then edit your php.ini file by typing nano php.ini

Step 4: Edit the upload_max_filesize, post_max_size, and memory_limit properties in your php.ini file

Step 5: Save php.ini by exiting Nano

Step 6: Restart Apache by typing the following into Terminal:  /etc/init.d/httpd restart

 

That’s it!

Many thanks to Dave for his help!

 

 

Force Users to Login to View BuddyPress Content

I have a BuddyPress-based website that I needed to require logins for. There are a number of plugins that force people to login to view content, but I couldn’t find one that forces people to login to see BuddyPress content while leaving all other content public.

So, I built this “BuddyPress Force Login” plugin. It requires people to login in order to view all the BuddyPress stuff – forums, groups, profiles, etc.

I would like to submit it to the WordPress repository, so please provide some suggestions for improvement.

DOWNLOAD.