Category Archives: Wordpress

Perpindahan domain prigad

Dear pembaca yang terhormat sebenarnya tulisan di blog ini adalah pindahan dari domain saya sebelumnya www.prigad.com. Domain tersebut telat memperpanjang jadi sudah di akusisi orang lain . Kebetulan saya memiliki domain satu lagi yang sebelumya saya fokuskan hosting, selanjutnya seluruh content dari prigad.com saya pindahkan kemari.

Continue reading

Recomended wordpress security mode

.htaccess    ../.htaccess    404
wp-config.php    ../wp-config.php    400
index.php    ../index.php    400
wp-blog-header.php    ../wp-blog-header.php    400
root folder    ../    705
wp-admin/    ../wp-admin    705
wp-includes/    ../wp-includes    705
wp-content/    ../wp-content    705
wp-content/bps-backup/    ../wp-content/bps-backup    755

WordPress 3.4

Highlights

  • Enhanced theme control
    • Customize theme options before activating a new theme using Theme Customizer
    • Use Theme Previewer to customize current theme without changing the front-end design
  • Media improvements
    • Support HTML in image captions
  • Under the Hood improvements
    • Improvements in WordPress internationalization and localization (more info)
    • Different split in translation POT files for faster translations
    • Codex XML-RPC information update accessed via XML-RPC_WordPress_API
    • WP_Query improvements

http://codex.wordpress.org/Version_3.4

Enable MultiSite in WordPress 3.0

Anda yang berkeinginan untuk upgrade wordpress singgle user anda menjadi multisite ada cara yang bisa di lakukan tanpa mesti install wordpress-Mu dari awal:

Menampilkan Network Menu

Tambahkan code ini pada wp-config.php Untuk menampilkan menu : Network define( 'WP_ALLOW_MULTISITE', true );

Membuat Network

Login ke halaman admin pilih menu tools – > network, isi yang diperlukan dan pilih install

Pilih mau menginstall pada direktori atau pada sub-domain untuk sub-domain anda mesti menseting dns baca tutorial saya di sini Selanjutnya silahkan ikuti perintah yang ditampilkan dengan mengkopikan code yang diberikan ke wp-config.php :

define( 'MULTISITE', true );

define( 'SUBDOMAIN_INSTALL', false ); $base = '/';

define( 'DOMAIN_CURRENT_SITE', 'prigad.com' );

define( 'PATH_CURRENT_SITE', '/' );

define( 'SITE_ID_CURRENT_SITE', 1 );

define( 'BLOG_ID_CURRENT_SITE', 1 );

.htaccess. :

RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

# uploaded files

RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^ - [L]

RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]

RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]

RewriteRule . index.php [L]

Setelah selesai silahkan login kembali dan anda akan bisa melihat tampilan Super Admin di bagian Dashboard dimana anda bisa mengatur user – user anda.

 


Installing WordPress MU on a CPanel/WHM Server

I was encountering some difficulties installing WordPress MU 1.0 using different subdomains, and I finally figured it out after some time, so I thought I’d do a walkthough to help fellow MU-wannabes. :)

I think its important, first to understand that different web hosts use different admin control panel systems, and mine is using CPanel/WHM. I have a reseller account, so I have access to the WHM console.

To triple confirm, your webhost admin should look something similiar to this:

CPanel

and your WHM, if you are a reseller, should look like this:

WHM

Actually, on a second thought – it may not, because this is one of the skins… but just make sure you are using CPanel/WHM if you want to follow through with this walkthrough.

What are we going to achieve here?

At the end of the whole thing, you will install WordPress MU 1.0 on your server, using a different subdomain for each blog. So for example, if your domain is bloggingiscool.com, then you will be able to quickly create blogs like http://firstblog.bloggingiscool.com, http://secondblog.bloggingiscool.com… and so on.

In this installation, you will also be installing it in the root directory of your server (i.e. public_html), so http://bloggingiscool.com will be your main MU blog. You can choose to install it in a subdirectory, such that http://bloggingiscool.com/blogs as your main MU blog, but again I will cover only the first one. Go figure (duh, just dump the code one level deeper!), if you want to install it in a subdirectory.

Note that WordPress MU also offers another alternative, that is to install each blog in a different subdirectory. I will not be covering that here.

Lets get started.

Step 1. Download WordPress MU and extract the files

The first step, is of course for you to head down to the WordPress MU download page, and grab a copy of the source code. It should be a zip or tar.gz file. Doesn’t matter.

Unzip the file. You will get a directory like this:

WordPress MU Unzipped

Step 2. Upload Those Files!

Now, WordPress freaks out there, DON’T be tempted to go and edit the wp-config-sample.php! What you need to do now is to just upload the whole thing into your webserver!

So, the files in your public_html folder in your web server will look like this (treat the wordpressmu-1.0 folder like your public_html folder)

Remote Directory

Step 3. Change File Permissions

Head on to your domain. i.e open your browser and head on to http://www.{your-domain}.com

You may get this message, or a few different others. Just follow the instructions and to the CHMOD to your files.

Also make sure that you have Apache’s mod_rewrite module enabled for your server. If you have been using WordPress on your server with custom permalinks, then you are fine. If you are unsure, do check with your server admin.

Change Permissions

When you are done with the permissions setting, you should get this.

Enter WPMU Blog Details

Hold on a minute, don’t enter the details first.

Step 4. Set up your mySQL database

Now its time to log on to your CPanel and create your mySQL database and user. For this example, lets say your mySQL username is blogcool_user, password is bloggingisverycool and database name is blogcool_wpmu.

Step 5. Enter the details

Select “subdomains” in the Blog Addresses section, enter your mySQL credentials into the page, and the details of your main blog.

Use subdomains

Hit submit and you will grin like me :mrgreen: seeing that you are done!

WPMU Installation Done

Your login credentials are sent to the email address specified.

Don’t be too happy yet. You are only halfway done!

Yeah. The show has just begun. WordPress MU is installed, fair enough, but configuration for your subdomains will NOT work! You can go ahead and create the blogs, but you WON’T be able to access your blogs using the subdomains like http://firstblog.bloggingiscool.com

So, next, you need to configure your server!

For those who do not have reseller accounts, you might just need to ring your server admin up to get this part done for you. For those with reseller accounts, you still need to contact your server admin. The only time you do not need to contact your server admin is when you have the rights to access your server’s httpd.conf file.

Well. I didn’t. That’s why I was stuck~! :D

Step 6: Configure your wildcard DNS and sub domains (sounds geeky)

Update: If you have CPanel X3, you DO NOT have to configure the DNS zones or make changes the http.conf file. All you have to do is to create a subdomain, called “*”.

Yes, a subdomain with an astericks.

I’ll do some screenshots when I do find the time to do so! Meanwhile, pardon me! :)

Read more about this step at this comment.

If you read the readme, it recommends you to Matt’s blog where he explains how to do so. But to me, it didn’t really help, because he was giving me a bunch of code – I had a graphical web interface for my reseller admin console.

Anyway, here’s what you need to do.

Log in to your WHM account. On the left, find and click “Edit DNS Zone”.

Edit DNS Zone

Your accounts appear on the right. Select the domain you use for your WPMU installation, and click “Edit”

You will see a bunch of text boxes and a bunch of numbers!

Whoa! What is this? To be frank, I don’t know much either, but what I know is that messing with these number is no fun (because I’ve messed up with them before, and caused some trouble for the server admin :mrgreen: )… but I know what to do now.

You will see something like this. (erm.. minus the red arrows. Those are my drawings. Nice? :) )

Add DNS Zone Entry

Create a new entry after “Add New Entries Below this Line”.

You should specify * for domain, 14400 for TTL (default value), A for record type, and your server IP address. To find out what IP you should type, refer to the record with your domain above.

Click save.

Go ahead and retrieve the same page again (i.e. Edit DNS Zone -> Select Your Account). You should see the new entry there.

New DNS Entry

If that is the case, you are done with WHM. *phew* :mrgreen:

BUT you are not totally done yet!

Step 7: Erm… part 2 of step 6? I promise this is the last part!

You need to add something to your httpd.conf file.

I personally do not have the opportunity to do so, so I had to mail my friendly server admin to do it.

Here is what you need to add:

<VirtualHost {SERVER_IP_ADDRESS}>

DocumentRoot /home/{CPANEL_USERNAME}/public_html
BytesLog domlogs/{YOUR_DOMAIN}-bytes_log
User {CPANEL_USERNAME}
Group {CPANEL_USERNAME}
ServerAlias {YOUR_DOMAIN} *.{YOUR_DOMAIN}
ServerName www.{YOUR_DOMAIN}
CustomLog domlogs/{YOUR_DOMAIN} combined
</VirtualHost>

Where:

  • {SERVER_IP_ADDRESS} is your server IP address
  • {CPANEL_USERNAME} is your CPanel username. Normally this should be eight characters or less. This is the username you use to log into your CPanel console for your account
  • {YOUR_DOMAIN} refers to your domain, e.g. bloggingiscool.com

So, giving an example, where my IP is 123.456.789.123, CPanel username is blogcool and domain is bloggingiscool.com, the code is like this:

<VirtualHost 123.456.789.123>
DocumentRoot /home/blogcool/public_html
BytesLog domlogs/bloggingiscool.com-bytes_log
User blogcool
Group blogcool
ServerAlias bloggingiscool.com *.bloggingiscool.com
ServerName www.bloggingiscool.com
CustomLog domlogs/bloggingiscool.com combined
</VirtualHost>

Again, you (or your server admin) need to add this to your httpd.conf file, and according to Matt, this entry must come after any valid subdomain VirtualHost entries you may have. So if you already have another subdomain on that same account, then make sure this entry come after the subdomain’s entry.

Then you are really finally done!

Sources

 How to backup WPMU

Backup. Everyone tells you to, but maybe you don’t know how. After all, your host does backups, right?

True – your host does backups, but can or will restore only in the event of a complete disaster, and it restores the entire web account. You should very much take your own backups and store them somewhere else.

There are two things you need backups of:
– the database, where settings and content live
– the wp-content folder, where plugins, themes, and uploaded files are stored. The rest of the files are replaceable, unless you made hacks to the core.

If you have phpMyAdmin on your server, database backups are easy. PhpMyAdmin has an Export function to backup the entire database or just a table, if you wish.

In the event your database is large and using phpMyAdmin gets too unwieldy, your host may have a database backup tool in the web account control panel.

If you have ssh access, making a database backup is even easier. After logging in, move to the folder where you want the backup to be stored for now. A good one woudl be a /backups/ folder on the same level as public_html for now. Run the following command:

mysqldump –opt -u dbuser -p dbname> dbname.sql

Replace dbuser, dbname with your own. This will give you a straight up SQL dump of the database, so let’s compress it. Run this:

gzip -c dbname.sql>dbname.sql.gz

I like doing it in two steps so I know it’s done right, but if you wanted to do it all in one go, try this:

mysqldump –opt -u dbuser -p dbname> dbname.sql | gzip > outputfile.sql.gz

Now you have the database backed up and not saved under public_html, because we don’t want the outside world to have access to it. :) If you did it in two steps as above, you’ll have a zip of the database as well as a SQL dump, so to free up some space, we can get rip of the dump since we already zipped it.

rm dbname.sql

Now navigate to the root of your install. It may be something like
cd /home/webaccountname/public_html/

Let’s archive the entire wp-content folder.

zip -r wp-content-backup-Dec-3.zip wp-content/

This puts everything under wp-content in a zip. The -r in there tells it to get all the subfolders too. I like to put the date I made the backup in the filename. Once filenames have stopped scrolling by, move this zip to the backup folder we made previously.

mv wp-content-backup-Dec-3.zip ../backups

This moves the file from where we are up one directory and down into the backups directory we made earlier. Now you’re ready to move both zip files somewhere else off the server for safekeeping, or continue with an upgrade.

Sources

Backup database wordpress pada cPanel menggunakan phpMyadmin

Untuk menjaga keamanan data dari sebuah web CMS yang berbasiskan wordpress perlu di lakukan backup, dan untuk waktu backup sangat tergantung dari seberapa banyak posting yang anda buat, seberapa banyak komentar yang ada, seberapa banyak file yang di upload jadi anda sendiri yang bisa menentukan bagaimana dan kapan perlu backup. Untuk membackup database wordpress anda dari cpanel bisa mengikuti langkah berikut:

  1. Login ke cPanel anda dan pilih phpMyadmin : 
  2. Selanjutnya pilih database yang akan di backup: 
  3. Pilih Export -> select All Check "Add DROP TABLE" Check "Complete inserts"  Check "Save as File" Check "None" apabila database anda besar silahkan di check untuk di compress selanjutnya Click Go.

How to Upgrade WPMU 2.9.2 to WordPress 3.0 in 5 Easy Steps

Late last night WordPress 3.0 RC1 was pushed out and we knew you’d need an upgrade guide, since it’s not a one-click process. There are a few steps to getting your WPMU site working with 3.0 but this guide will help to make the process as simple and smooth as possible.

To Upgrade or Not to Upgrade?

It is important to note that many of you will want to wait until the final release is here in order to start upgrading. Taking your WPMU site to 3.0 may not even be an option if your site’s functionality is heavily dependent upon plugins that have not yet been updated for 3.0. However, you’ll need to upgrade eventually, so make sure to bookmark this guide. In the meantime, it might be a good idea to make a duplicate of your site and perform an upgrade to see how your plugins respond. If you want to play around with upgrading, then follow this guide but remember that plugins and themes that have not been updated may affect your upgrade process.

5 Steps to a Smooth Upgrade with Multi-Site Features

Unwritten step 1a is don’t freak out; we’re all doing this together. If you find other useful tips on the upgrade process, please post in the comments.

Before You Even Think About Upgrading: Backup Your Files and Database

You must do this in case something goes wrong. The best thing you could do is reproduce your site and do the whole process on the duplicate site so that you know it’s safe for what you’re running. In the very least, you should make a backup to restore just in case.

Step 1: Delete the /wp-admin/ and /wp-includes/ directories in your current installation.

Step 2: Download WordPress 3.0 (RC1) and upload the files to your site, making sure it overwrites the old files.

Upload all the files in the 3.0 folder and mark them to overwrite in your FTP client.

Step 3: Login as Admin and follow the Update Network instructions.

You should see this message at the top of the dashboard. Follow the instructions for updating your network. The details on the edits to wp-config.php and the .htaccess files are shown in steps 4 and 5.

Step 4: Update wp-config.php to include nonce_salt.

Setp 5: Delete wp-content/blogs.php and update .htaccess file to use wp-includes/ms-files.php instead.

The wp-content/blogs.php file is deprecated in 3.0. Remove it and update your server rewrite rules to use wp-includes/ms-files.php instead.

Now that wasn’t so bad, was it? I’d like to thank Pete Mall for his helpful tutorial for upgrading when the 3.0 beta 2 was put out, which put me on the right track for upgrading my sites. The bulk of the process is uploading files and cutting and pasting. Remove it from your list of dreaded tasks now that you know how simple it is. You can probably do this in under five minutes. Start playing around and enjoy all the new features of WordPress 3.0!

Sources