Tagged Questions

wp-config.php is the configuration file of WordPress, one of few that is not overridden during upgrades. It is essential for running WordPress, as it contains the information needed to connect to the database

learn more… | top users | synonyms

0
votes
1answer
251 views

How to use remote db tables in current config? [duplicate]

Possible Duplicate: Shared Members between two different wordpress installations with different databases For example I have 2 different wordpress installations with different domains and ...
1
vote
5answers
927 views

Moving WP from local server to live, error establishing a db connection

Not sure what's going on here 'cos I've done it already a couple of times and it always worked. Basically I'm moving a testing site from my local machine (MAMP) to a live server by: zipping the ...
10
votes
3answers
2k views

Define WP_DEBUG conditionally / for admins only / log errors (append query arg for all links?)

I'm developing a site on a server that the client has access to as well and what I'd like to do is show WP_DEBUG only for administrators. Referencing Yoast's article on a way around this: if ( ...
0
votes
2answers
598 views

Publishing Wordpress from stage to production server

I'm having trouble configuring wp-config.php correctly in a staged server environment. I'm being told that I should be working in my stage environment for Wordpress with an example address of ...
0
votes
1answer
101 views

$post->id vs $post->ID problem after using Wordpress config bootstrap

I'm developing with Wordpress in a multi environment scenario. I develop on my local machine, test on a server and so on. I was using the "trick" of having a local-config.php file to have different ...
0
votes
4answers
3k views

Permalink Issues by Installing WordPress in Subdirectory / Subfolder

I installed WP in subfolder /cms and it runs live without subfolder. When I use /%postname%/ as permalink I get 404 error on my site. My Server supported mod_rewrite. My Code wp-config.php ...
0
votes
2answers
4k views

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] ...
1
vote
3answers
152 views

Putting my site live

Can anyone help? I've been building a wordpress site in a sub directory of an umbrella 'development domain' if you will, and am ready to go live with the site. It's a single install of wordpress. ...
0
votes
2answers
1k views

How to decrease the max file upload size without using php.ini or htaccess?

There are a lot of people discussing how to increase the php max upload file size... In my case though I want to shrink it from 8MB to 4MB... In my cpanel configuration, if I change the setting, it ...
2
votes
1answer
589 views

Generate Wordpress salt

I am in need of a function that automatically generates and returns salts for Wordpress wp-config.php (Don't link me to their API, I'm looking for offline solution). Does Wordpress core has this ...
0
votes
2answers
848 views

Some plugins adding full server path after url (with custom wp-content folder)

Installing Wordpress SEO (an a few others but not all plugins) gives the following console error: GET ...
1
vote
1answer
337 views

How to use if condition to change $table_prefix in wp_config.php

I am testing a very big database (perhaps wp_posts contains hundreds of thousands of rows). As such, the query time, especially the searching query, is extremely long. I'm thinking if there is any ...
0
votes
3answers
843 views

Override Current Theme Setting in wp_config.php

I am looking for a way to override the currently selected theme, preferably from within the wp_config.php file. I know you can override some wp_options settings in the config like define('WP_HOME', ...
60
votes
8answers
18k views

Is moving wp-config outside the web root really beneficial?

One of the most common security best practices these days seems to be moving wp-config.php one directory higher than the vhost's document root. I've never really found a good explanation for that, but ...
1
vote
0answers
54 views

How can I make wordpress suppress mysql errors?

Wordpress has two functions related to SQL queries and their errors as mentioned in What Is The Difference Between suppress_errors() And hide_errors() in $wpdb? From what I've read setting WP_DEBUG ...
0
votes
3answers
1k views

Alternatives to DISALLOW_FILE_EDIT wp-config Constant? It Breaks Some Plugins

The Problem I first noticed this with the plugin Quick-Cache, which activates without problem, but doesn't shows up anywhere. Its menu it's simply not there. Found why, and became aware of the ...
7
votes
4answers
555 views

Password in wp-config. Dangerous?

I don't know a lot of Wordpress yet, and I'm just wondering: Before installation you have to fill in the correct data in wp-config-sample.php but this also includes the database password. Isn't that ...
0
votes
2answers
180 views

the_permalink() not working in a root installation

I hope someone can help me. I have a root installation of WP, but not as index.php (it's actually news.php). Consequently the_permalink() doesn't work, as the root of the website is a different page. ...
20
votes
4answers
3k views

Best practice for versioning wp-config.php?

Is there a best practice for including your wp-config.php file in your version control repository? I'm considering creating a new site with this type of configuration, (similar to Alex King and Mark ...
2
votes
1answer
327 views

Redirect one of two domains on one Wordpress installation

I have to domains: mydomain.dk and mydomain.de. Both are showing the same page in danish. I have a plugin that takes care of the languages, but I need to connect the .de domain to the german 'language ...
3
votes
2answers
12k views

Connect to database using wordpress wp-config file

How can I connect to the database using the wp-config.php file ? I'm trying to make a script more Wordpress friendly, and I need to connect to the database, but without installing the script as a ...
2
votes
1answer
758 views

integrating external php library into wordpress- the right way

If I were to load a custom library into wordpress, what would be the best place to add it? Since there are a bunch of global vars defined at the top of the library, I would not want that to be done ...
1
vote
1answer
1k views

Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#

So I've Googled and followed countless tutorials, read documentation on MySQL, Visual Studio, WordPress, and Plesk. I try to leave posting on this site as the final option and it seems it has come to ...
1
vote
3answers
2k views

Multiple wp-config.php files in one home directory

It's possible to move wp-config.php up one directory level for security, i.e. into the directory above public_html (sometimes called home or a user name, depending on the web host). "You can move the ...
0
votes
1answer
214 views

What are “best practices” for wp-config.php

Just started reading Professional WordPress®: Design and Development I'm reading the section on "Advanced wp-config Options". I see many options which I think are pretty cool/useful, but before I ...
4
votes
3answers
4k views

What is the best way to get directory path for wp-config.php?

I am developer of the plugin mapsmarker.com which also offers several APIs which can be accessed directly (eg www.mapsmarker.com/wp-content/plugins/leaflet-maps-marker/leaflet-geojson.php?marker=1) ...
0
votes
1answer
3k views

hide wp-content from urls

Here is what I am thinking of trying to hide wp-content from the urls of files included in page source. defining the following in wp-settings.php define ...
0
votes
1answer
206 views

Best function/method to access wp-config?

I have a developer who is accessing the wp-config file directly to get database information. I would think that WP has a better way to do this. What do you think community?
2
votes
1answer
401 views

WP Config for FTP credentials

Is there a config in WP that allows you to store your FTP credentials? I'm using the Linux webserver at work to develop and it's really annoying to have to but the credentials in every time I ...
2
votes
2answers
886 views

hook a functions to change wp-config from functions.php

is there a way to hook / filter or add action that would be printed in the wp-config file? lets say i want to add some simple command like "empty the trash" aka define('EMPTY_TRASH_DAYS', 1 ); ...
0
votes
2answers
798 views

Editing wp-config.php

I need to add the line define('WP_POST_REVISIONS', false); to my config.php , so that post revisions are disabled. I don't have access to wp-config.php, I have permission to edit my theme and ...
1
vote
1answer
5k views

Creating the wp-config.php file manually

Setting up WordPress, I'm getting the following message: "Sorry, but I can't write the wp-config.php file. "You can create the wp-config.php manually and paste the following text into it." Do I ...
0
votes
1answer
476 views

Getting WordPress to work inside a rails 3 application

I am migrating an existing WordPress blog into a subdirectory of a new rails 3 app (deployed on Apache2 / Ubuntu 10). I have PHP/MySQL installed, and I have a standard rails app folder structure in ...
1
vote
2answers
371 views

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 ...
3
votes
1answer
2k views

How to define a remote uploads directory?

Using the constant overrides in wp-config I'm able to define a remote FTP server that plugins will be added to when installed using the WP interface. define('FS_METHOD', 'ftpext'); define('FTP_BASE', ...
1
vote
1answer
83 views

How to run WordPress from other location on the same domain

Hi I have a domain running in WordPress, the path to WordPress installation is /subdomain/mywordpress/ and I can access these in mywordpress.mysite.com, Now I wish to load the index page on my main ...
2
votes
2answers
104 views

WP disobeys disabling of the posts revision feature

I disabled the posts revision feature according to this codex by placing this code in the wp-config.php: define('WP_POST_REVISIONS', false ); But revions are still being saved by the WP. Why? I am ...
0
votes
1answer
121 views

Wrong WordPress language?

I'm a bit confused now. I've installed Wordpress for my Polish friend from here: http://pl.wordpress.org/ On my local machine everything works fine and is in Polish, but installing it on the web ...
2
votes
2answers
214 views

How to update WordPress from the latest trunk

I read somewhere that I can set a constant in the wp-config.php to update WordPress from the latest trunk version and not the stable version. Stupid as I am, I can't find the site anymore where it was ...
0
votes
2answers
568 views

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: ...
0
votes
4answers
925 views

Can two domains use the same database?

I want to change a current site that already has a fairly robust database. Before I do, I want to test a few different layouts to make a decision. Instead of using the original site, I am thinking ...
1
vote
1answer
306 views

How to stop fatal error when loading theme template file directly

If one tries to load a theme template file directly, the following error message is displayed: Fatal error: Call to undefined function get_header() in ... and it goes on to list the full directory ...
10
votes
2answers
1k views

Symbolic Links on dev box with plugins and stylesheets

I'm using mac os x 10.6 with xampp. http://wp3.1/ is the url to where I have WordPress installed. The physical path is /Users/myUserName/Sites/wp3.1/ I do not install plugins or themes in the ...
1
vote
1answer
819 views

Securing wp-config leads to sensitive information leak on wp-settings

I read the following tutorial, which mentions moving your config file out of an HTTP-accessible folder. http://codex.wordpress.org/Hardening_WordPress#Securing_wp-config.php I did this, and it works ...
1
vote
3answers
2k views

Character encoding issue after changing servers

I recently moved my WordPress-based site from DreamHost VPS to a Linode VPS running Debian + LEMP. After getting the site up again, I noticed many erroneous characters in posts; characters like " and ...
3
votes
2answers
2k views

Turn Off Automatic Trash Deletion?

I have a client who wants to use the trash feature, but keep items in there indefinitely (I have no idea why, but they insist on it). From reading this codex article on the trash status, I see that ...
0
votes
2answers
1k views

Problem with new Multisite Installation

I have installed and converted two wordpress installations to Multisite .It was not first time and I done it before for some of my websites. I was successfully able to use it too.But I could not find ...
6
votes
2answers
2k views

Prevent access or auto-delete readme.html, license.txt, wp-config-sample.php

Just a quick question that might help a tad bit with security. I noticed that the readme.html file has the version number listed. It reappears after each upgrade and so do the licence.txt, and ...
3
votes
3answers
2k views

Does changing 'WPLANG' in wp-config.php just effect the admin language or does it have other consequences?

I am curious to know if setting 'WPLANG' in wp-config.php just effects the admin language or does it have other consequences? I run a blog in a foreign language but use English in my admin. I ...
3
votes
1answer
709 views

domain mapping confused about sunrise

When i try to access my domain mapping page it asks me to move the line define('sunrise', 'on') above the last require_once line in the wp-config file. It is already above this line. I tried moving it ...