Articles of wp config

How to reliably set file/folder permissions?

The Codex notes that wp-config.php can be used to over-ride file permissions by adding: define(‘FS_CHMOD_FILE’, 0644); define(‘FS_CHMOD_DIR’, 0755); Having done this… why then, when using an ftp app to view the permissions of a file, are they shown as different? For example, by ftp I set wp-config.php to 600 before modifying it – and by […]

Why am I unable to login after converting to www?

So I originally designed the site without the www. I’ve since realized that it’s going to cause more problems than necessary. I created a rewrite rule that converts to www. I then changed the domain in wp-config define( ‘DOMAIN_CURRENT_SITE’, ‘openeye.net’ ); define( ‘PATH_CURRENT_SITE’, ‘/’ ); define( ‘SITE_ID_CURRENT_SITE’, 1 ); define( ‘BLOG_ID_CURRENT_SITE’, 1 ); define(‘WP_HOME’,’http://www.openeye.net’); define(‘WP_SITEURL’,’http://www.openeye.net’); […]

What Does this Code Snippet Do?

I got this error message when I was installing a plugin: “Unable to locate WordPress Content directory (wp-content)”. I found a solution here: http://wordpress.org/support/topic/cannot-find-content-directory-wp-content They suggested adding the following code to the wp-config.php file: if(is_admin()) { add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ )); define( ‘FS_CHMOD_DIR’, 0751 ); } This solution worked for me. My questions are: a) […]

Why do I get a WAMP homepage when clicking on specific website's URL on LocalHost?

Using WAMPSERVER for windows 7, smartgit and Safe Search Replace I have pulled a wordpress code from my git, downloaded a database and inserted into my localhost‘s phpmyadmin. My home page works but when I click on one of the links I get the WAMP homepage. What am I doing wrong? I have tried the […]

How to disable the default WordPress redirect to non-www URLs?

I am trying to redirect all non-www to www URLs in my WordPress MultiSite install. I am using a simple .htaccess rule like this: # Redirect non-www to www: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Normally this would work, however WordPress already seems to have a default redirection to non-www URLs. This means […]

Accessing two databases

I have two databases on my server, and wanted to know is there a way to access both databases from wordpress? My thought is adding the second set of credentials to the wp-config.php.

html lang=“” instead of lang=“en-us” – why?

In a few installations of wordpress, the beginning of the html tag looks like <html lang=”en-US” … despite that in wp-config no language is specified. define(‘WPLANG’, ”); Hovever, in one installation the tag is <html lang=” ” … how would i change that to <html lang=”en-us” …, without changing the wp-config file I’m talking about […]

How to Better Control WordPress Cron Jobs?

I have a bunch of standalone WordPress sites, and WordPress Multisite Network of Sites on my server. There are times where there are too many sites all running cron jobs too soon in proximity. I am looking to better control when cron jobs are triggered on each WordPress website. Is it possible to disable WordPress […]

Single Must Use Plugins Directory for local development

I have multiple local installations of WordPress and want to have a single Must Use Plugins directory for all my local sites. Is there anything I can add to wp-config for instance that will let me have a single folder which can be used for all my sites? Or perhaps another approach? For instance: /root/sites/site1/… […]

Enable Full SSL for WordPress

I’ve enabled SSL for my main domain but i want to enable it fully for my wordpress website which is located in a subfolder. when i say fully i mean in admin area and the website itself and without any mixed content error. so first i tried adding these in wp-config: /* Enable SSL Encryption […]