WordPress PHP memory usage – a proposal

Recently I switched hosts and upon transferring my sites quickly noticed that I was having some PHP: out of memory errors.

I only use the bare minimum plugins and have all of my themes optimized to limit PHP usage. I don’t use widgets, and if it can be hard coded using plain html, it is.

But still, I was out of memory. After some research I found that most of my issues were occurring in the admin panel, and not the main site. While this was a relief, this did leave me with limited admin functionality.

I was able to correct the issue by increasing my php memory limit from 32mb to 64mb, but I hardly feel this is a solution.

Why is wordpress using so much memory? This is a question that I feel needs investigated.

A Solution: Allow users to put together a custom wordpress install, just enabling features that are needed for that particular blog.

I do not need al of the feeds on the admin homepage, I do not need template editors, I do not need widgets, I do not need trackbacks or pingbacks, I do not need a plugin editor…. The list goes on.

So why not allow advanced users the option to install what would essentially a vanilla version of wordpress? Sure, I could make these changes now, but it makes updating a pain because everything would have to be re-applied.

For now this is just something to think about, but if you have any input as to how I am wrong (as I’m sure I am) feel free to leave a comment.

WordPress Update Failed: Warning: touch() [function.touch]: Unable to create file…

 

Recently, I reconfigured on of my WordPress installations to run as WordPress MU, instead of the standard, single site platform. This was perfect for me because now every time I create a new site, I don’t have to create a new database, install plugins, ect. It really gives me a head start with a basic template for every new site.

As awesome as this new setup is, I almost immediately ran into problems. I could not install any plugins via the web interface! I also couldn’t update WordPress! I am perfectly capable of doing things manually, but it was just so much quicker for me to do things from the web interface, but everytime I tried, I ran into this error:

Warning: touch() [function.touch]: Unable to create file…because Permission denied in \[mydomain]\wp-admin\includes\file.php on line 175

This was a problem. I first dove into file.php and looked for line 175, changed some permissions around, but no luck. That’s when I asked my close friend Google.

I read everything from server incompatibilities, to my host not allowing access to my server’s temp folders. I am sitting on a VPS, so i was just about to dive in and start making some changes, when I found my solution here. It turns out I needed 2 things.

First I added the following line to the bottom of my wp-config.php file:

define(‘WP_TEMP_DIR’,ABSPATH.’wp-content/uploads/’);

And then I made my “wp-content/uploads” folder writable.

It was a simple as that, problem solved.

WordPress.com or WordPress.org?

com_vs_org

Time and time again, I find that people are confused by WordPress.com, and WordPress.org. What is the the difference? They are both WordPress right? Which one is right for me? Keep reading, all of your questions will be answered.

What is WordPress?

The first question we will address is What is WordPress? In short, WordPress is a highly effective blogging platform that is extremely customizable, and very user friendly. For those of you who are not tech-savy it is kind of like a program for your computer, only online.

Even though WordPress has gotten it’s name for it’s blogging capabilities, it has grown into a full blown content management system, and can be used to run virtually any type of website with enough customization. WordPress is optimized extremely well for speed, and SEO and is very user-friendly.

WordPress.com vs WordPress.org

Now that we know what WordPress is, it is time for use to learn the difference between WordPress.com and WordPress.org. Yes, they are both powered by WordPress, and they are both very similar, yet completely different.

In short, WordPress.com is for those of you who do not have your own web hosting or domain, but want to get started. If is 100% free, and boasts the same popular software. WordPress.org on the other hand, allows you to download, change, and install the same application, used on WordPress.com. WordPress.org is for users that want to use their own domain, hosting, plugins, and be able to customize everything with virtually no restrictions.

Benefits of using WordPress.com

  • It is free
  • It is installed for you
  • Requires no domain or hosting
  • Security is handled for you
  • Spam protection is taken car of for you
  • Automatic backups
  • Possibility of free traffic from the Tag system
  • Easy to find similar blogs and partners
  • Secured login

Cons of using WordPress.com

  • Can’t edit core files
  • Can’t install plugins
  • Can’t upload custom themes (however you can edit the 70 themes pre-installed)

Benefits of using WordPress.org

  • Can upload custom themes
  • Can install plugins
  • Full control over the core files. If you don’t like something, change it!
  • Very large support community

Cons of using WordPress.org

  • You must provide your own host
  • Must provide your own domain
  • Responsible for your own security
  • Responsible for spam control (there are some great plugins for this)
  • Must handle your own backups
  • Must handle your own upgrades

In closing, if you are just getting started, WordPress.com is a great way to go, and get your feet wet. However, if you are serious about creating your own website, and your own brand, there is no better solution than WordPress.org.

WordPress: Error after updating permalinks

So you have your blog up and running and you are playing with all of the settings. You make it to the setting to update your permalinks so they display more than just a number for the post. It all seems to go well, but when you go to your blog to check things out, you notice every page is broken except for your homepage.

Don’t fret, this happens to people all of the time. It is quite possibly one of the most common problems I have heard of. It is caused when the .htaccess file does not allow wordpress to add the proper code to redirect to the new permalinks.

How to fix it:

There are two solution’s here. You can either update your .htaccess file manully, or let wordpress do it for you.

Manually fixing it:

  1. Log into wordpress and navigate to the permalink settings page.
  2. Select your desired permalink structure and click save changes.
  3. Now if wordpress was unable to make the necessary updates it will output some code at the bottom of the page. This code needs to be added to your .htaccess file. This file is found in the same directory as wordpress.
  4. Save the updated file and try things out.

Letting WordPress fix it:

This fix is for people who aren’t comfortable messing with code.

  1. First you will need to open the directory where wordpress is installed either through your control panel or ftp.
  2. Then locate the .htaccess file found in your wordpress directory.
  3. Change the file permisions of the .htaccess file to 777, be sure to write down it’s original settings.
  4. [singlepic=6,320,240,,center]

  5. Log into wordpress, and navigate to your permalink settings.
  6. Select your desired permalink structure and click save changes.
  7. Now change your .htaccess file back yo it’s original settings for security reasons.

Hopefully this little tutorial will help you solve your issues. If you have any further questions just comment here and I will answer them.

Lost WordPress Password. What now?

You don’t know how often I hear people say, “I lost my WordPress password, what do I do now?”

Well, the first thing to do is use the automatic recovery found on the login page.

lost-wordpress-password.png

This will allow you to email a new password to yourself.

What’s that? You forgot your WordPress email address too? Don’t worry, you aren’t alone. Everyday I read on forums and stories about how people have lost both their password and email. By now many of them are thinking all is lost, but it’s ok, you’re not dead yet.

This is the ultimate fix. It will allow you to see your email and change your password. However, it involves editing your database.

I know, editing your db can be a scary thing, but this really isn’t hard. Simply follow these steps and you won’t have any problems. PS, you can click on the thumbnails to make them larger.

  1. Backup your database. I know you are thinking about skipping this step but be sure you take the backup, no matter what. Nothing should go wrong but if it does you will be thankful you have the backup.
  2. Log into phpMyAdmin. What, you don’t have that? I am 90% sure you do. It can be found within your hosting control panel, ie cPanel. You will often find this in your database manager. If you cant find it contact me and I will help you.
  3. Navigate to the table wp-settings.
    password-1.png
  4. Next you will want to click on browse. This will list all of your users, and information.
    password-2.png
  5. Now select edit (the pencil) for the user you wish to change the password for.
    password-3.png
  6. Next look for the row labeled “User pass.” This is the row you want to edit. You will notice your old encrypted password in the value box. Sadly you won;t be able to decrypt this, but we will be able to overwrite it with the new one.
  7. Once you found the row user_pass select md5 in the drop down box, and type your new password as the value. Click “Go” and it will automatically encrypt everything for you.
    password-4.png

Congrats! Your password is now updated. Just go login, and make sure that everything works the way it should.