Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Monday, December 24, 2012

Wordpress: Permalinks problem in UBUNTU

How to get WordPress permalinks / pretty links to work in Ubuntu 10.10 with Apache2

1. Manually create a ".htaccess" file and save it in your main WordPress directory. (This is the one with the wp-admin, wp-includes, and wp-content folders.)

2. Go to the Ubuntu terminal and type:
sudo chown -v :www-data "/enterYourFilePathHere/.htaccess"

You should see a line printed saying that the (group) file ownership has been changed to www-data (Apache2).

3. Give Apache2 write access to the file:
sudo chmod -v 664 "/enterYourFilePathHere/.htaccess"
You should see a line printed saying that the mode of the file has been retained.

4. Next, we have to allow WordPress to write to the .htaccess file by enabling mod_write in the Apache2 server. Type the following in the terminal:
sudo a2enmod rewrite

You should see a line printed saying that it is enabling mod rewrite and reminding you to restart the web server

5. So let's do that. Restart the web server, Apache2, for the changes to take effect by typing:
sudo /etc/init.d/apache2 restart

We are all done with the command line prompt; you can close the command line window now.

5. Go into your WordPress admin panel (i.e. http://yourDomain/wp-admin). Go to the Settings --> Permalinks and select the permalink format of your choice. Hit the "Save Changes" button.

6. DONE! Go to your site and check any page (other than your homepage) to ascertain that everything is working as expected.

**
7. The additional step I had to take was to edit /etc/apache2/sites-enabled/000-default.
    In that file you'll find an AllowOverride setting for /var/www, saying "None".

    Change the setting to say: AllowOverride All
    Restart the web server, Apache2, for the changes to take effect by typing:
  sudo /etc/init.d/apache2 restart
   

Monday, December 19, 2011

Wordpress - Permalink Problem

Salam,

I've just set up WordPress on my personal FreeBSD server, and now I'm trying to configure permalinks to this format:
/%category%/%postname%

This is not working. I've followed those instructions as well as I can, but it's still not working.

In httpd.conf:


Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all


Then,I chmod'ed the .htaccess-file so WordPress could edit the file. The file is now containing this:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress

After some reading and checking, I found out that my .htaccess-file is not being read! How to solve this?

From forum I read, he says that "You see AllowOverride None anywhere in your config files?"

So in my httpd.conf, I found it here:

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride None
AllowOverride All

I comment the original setting, and set to AllowOverride All.
After restart apache, the permalinks now working like a charm.
Alhamdulillah..

.

Tuesday, December 7, 2010

Wordpress- Nextgen Gallery Problem

Issue:

In Nextgen Gallery Plugins..

This error comes up when we want to upload pictures in gallery..
Upload failed! Failed to write file to disk

Upload Media also got Errors
Error saving media attachment.

I do:
Set all permission to all related folders to 777, still get the same errors.
Then I search the same problem in internet, and found this:
Have you exceeded your disk space quota?
http://bytes.com/topic/php/answers/820628-wordpress-image-upload-failed-write-disk-urgent

Then I inform server guy to check on the server space for this issue..


Solution:
Check /var/log/snmpd.log for www server.
Clear all log in the log file. Thats all.

Try back to upload the picture in gallery. See.. it works!
Thanks to all colleagues for helping me overcome this issue.

.

Sunday, June 27, 2010

Error saving media attachment in WordPress

Error on site: Error saving media attachment

Last week my friend (Arabic webmaster) told me that our site cannot upload picture or any files in media library. It happened since last Thursday. So for the whole Friday I search I have used to search the net for a solution. And I actually found most of the forums & blogs said to do this step:
  1. Go to “Settings” then go to “Miscellaneous” and check that your “Store uploads in this folder” is correct. Is should be something like “wp-content/uploads”.

    Mine was already use it.

  2. Next step is to check the permissions for your “uploads” folder located in “wordpress/wp-content/uploads/” on your server. Changed the whole “uploads” folder with “chmod 777 uploads” without luck.

    Mine also was set to 777 as it, but still cannot work.

So, after check everything here and there, finally our server guy suggest to reboot the www server. It is not the best, but it seems our last choice after checking everything ok. And yahoo!!... it works!. All the media upload function back in media library and post.

I'm feel relief .. Thanks Allah for showing us the way out.. :)

.

Tuesday, June 1, 2010

Wordpress 2.9.2: Install Plugins Problem

Salam,

Last week, I already installed new wordpress 2.9.2 in my dev server. I setup and configure all require file and the site can display well.

But the problem occur when I want to install plugins. The page display box to set connection info by ftp.. I try to check here and there, but still cannot find the setting file.... and finally I found the solution.

After we try to change the ownership of the wordpress folder to www, the plugin can be install without asking any connection setting info...

I'm happy :). Thanks tis guys for lend me yours big hands.:)


.

Tuesday, January 12, 2010

WORDPRESS: NextGEN Gallery Not Function after Upgrade!

My Case:
I upgrade Wordpress 2.7 to wordpress 2.9.1.
The I also upgrade all plug-in that we use in the wordpress includes NextGEN Gallery.

All the previous pictures and gallery still there but the slideshow not working in publish news page.

Solution:
  1. Download JW Image Rotator from here.

  2. Unzip and copy the Imagerotator folder in uploads folder.
    Default path is ../wp-content/uploads/

  3. Open the NextGEN Gallery admin panel page. Setting back the NextGEN Gallery Options. Compare the details with the previous gallery setting to get the same effect.

  4. Save all setting. Try refresh the page again. It' s done.

.

WORDPRESS: How to solve ‘You do not have sufficient permission to access this page.'

Case 1:
We install the same wordpress file in new server.
But we change the prefix of the database. After setup everything, the website page cannot be display. Error occur.

Solution:
  1. Open database that have been use for this wordpress using phpmyadmin.
  2. Search url: www.address.edu.my dalam db
  3. Change all address to new address :www4.address.edu.my
    Probably inside:
    wp_options

  4. But after change all the address to the new one, the admin page cannot be open.
    There some error said:'You do not have sufficient permission to access this page.'

How to solve ‘You do not have sufficient permission to access this page.'

After seacrhing all the possible solution from the internet, finally we found the solution in this site: http://beconfused.com

Because we change the prefix of the table names in WordPress after the migration, thats why the error occurs.

In my old database, I used ‘wp_’ as my prefix. As I migrated, I decide to use ‘newprefix_’ instead of ‘wp_’. Unfortunately, the meta_key values are tied down to:
  • wp_user_level
  • wp_capabilities
  • wp_autosave_draft_ids
So, we need to update it to
  • newprefix_user_level
  • newprefix_capabilities
  • newprefix_autosave_draft_ids

The following statements go to ‘meta_key’ and does a string replace from ‘wp_’ to ‘prefix_’.


UPDATE `prefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'prefix_' );


(** Dont forget to do backups first! Note that the quotes used for string and field name are different. )


Not finish yet! This another one statement you need to do also.


In the options table, there is ‘wp_user_roles’, make sure you get that changed into ‘prefix_user_roles’.


UPDATE `prefix_options` SET `option_name` = 'prefix_user_roles' WHERE `option_name` ='wp_user_roles' AND `blog_id` =0;



Try it, I tried logging in again and it worked. Thank you very much to http://beconfused.com


After successfully open the admin page, we run the upgrade automatically after deactivate all the current active plugins. All run very well without error.

But after check back all the links inside the website page, we found this error again:

WordPress 404 Not Found Problem

I already post this solution in my last year post. Refer the solution there.
http://salinaitmind.blogspot.com/2009/07/wordpress-move-site-to-new-server-issue.html

After that, every links can work fine. Alhamdulillah...



.

Tuesday, July 14, 2009

Wordpress: Move Site To New Server Issue

Case 1:
We plan to migrate our local www to outside server .. all related files transfered successfully.. and we decide to seperate between files(www) directory and the database(mysql).. all transfered and dump successfully to their own server.

After edit the configuration file(wp-config.php).. the main page can display well.. but all the created menu links does not go to the right url. The WordPress address (URL) not change as is the url setting in vhost.

Problems:

1.Page wp-admin page cannot appear
2. WordPress address (URL) not change as is the url setting in vhost.
3. The home page looked fine but all permalinks returned a ‘404 Not Found’ error.

Solution and action taken:

For problem no.1 and 2; the problems come from the General Setting that store in the database. Because of the admin page cannot be open, we need to edit the url setting through mysql wether using command or phpmyadmin...The url edited in table wp-options.
Make sure the grant permission is right. After settle that, the admin page can be appeared and the created menu links corrected to specify new url.. but the no. 3 problem still not solve.

Solution No. 3:

WordPress 404 Not Found Problem

In my case after a move of my site, I checked and double checked and it was NOT the .htaccess problem instead, the new apache httpd.conf had:

AllowOverride None

I changed it to:

AllowOverride All

and did an apache stop/start. Problem solved, and the .htaccess started applying again.

The problem successfully solve!!.. I'm happy now... :)


..

Sunday, May 3, 2009

Wordpress VS Joomla

The basic difference between WordPress and Joomla is that Joomla is a portal- or community type site while WordPress is a blog.

I found a great article written on the Joomla! site (though it is not biased at all) that points out how Joomla!, Wordpress and Drupal are the top three CMS / Blogging systems out there. Choose any of them and you’re a winner…well, depending on what you want your website to do.

Wordpress is a blog. That’s it. That’s all that it ever will be succesfully. The code is written sloppily and with every upgrade the system breaks a plugin that has been installed, or a theme that has been custom designed. It’s also extremely dificult to make it do what you want, as I’ve spent many hours trying to do just that.

Joomla! is a Content Management system (not a portal, though it could be used as one…) This means that it is used to aggregate a lot of content and put it into a nice form on your website. This includes blogs, magazines, newsletters, articles, knowledge bases, tutorials, forums, and much more. Joomla gives you a lot of power in your hands and that is noticeable in the admin section where there are so many options that you get dizzy the first time you go in.

Granted, it’s a wonderful blog if that’s all that you are doing and all you want to do. But if you want flexibility…go with Joomla! or even Drupal...

For instance, adding or removing post dates in wordpress, need to be changed in design mode and it requires knowledge of WP scripting. The navigational structure is determined by the layout template you chose. Changing that structure again requires knowledge of the WP scripting language and CSS. With Joomla, you do not run into this problem because menus are controlled via the control panel and attributes like dates, author name etc, can be turned on and off per article or for the whole site in one go. In that sense, Joomla is much more a content management system.

Hmmmh... does the choice right?... Then make your own choice.. & good luck.