Tag Info

Hot answers tagged

4

I use Dropbox as well, but not directly linked as the Dropbox folder path could differ from install to install. My Dropbox just is the root of my bare git repository. Simplified... When I start coding, I just add a new folder to my Dropbox and --bare init it. // Inside your Dropbox/webdev/themes folder for e.g. git --bare init Then inside your new Theme ...


4

You can do this by adding some code to wp-config.php $request_uri = $_SERVER['REQUEST_URI']; $debug_dirs = array ('/debug-dir1/','/debug-dir2/'); // list of directories to turn on debugging foreach ($debug_dirs as $debug_dir) { if (!strncmp($request_uri,$debug_dir,strlen($debug_dir))) { define('WP_DEBUG', true); } } define('WP_DEBUG', ...


3

This is how i set my content directory in wp-config.php // ======================== // Custom Content Directory // ======================== define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/somedir' ); define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/somedir' );


3

To disable WordPress Cron Jobs, place this in wp-config.php: define('DISABLE_WP_CRON', true); To schedule a cron job in Linux with cPanel for example... This is the command you might run: wget -q -O - http://www.your-domain.org/wp-cron.php?doing_wp_cron >/dev/null 2>&1 The end of the above command just suppresses any output. Just pick the ...


2

Is it possible to set different WP_CONTENT_URL values for different sub-sites in wp-config.php ? Ans: Yes it is. If sub sites are installed on sub-domain, An example to define it this way - define( 'CURRENT_SITE_DOMAIN', $_SERVER['HTTP_HOST'] ); if( 'sub1.domain.com' == CURRENT_SITE_DOMAIN ){ define( 'WP_CONTENT_URL', ...


2

While I cannot speak to your specific white-screen issue, registered theme directories must be within the Apache document root, at minimum. Many files in themes, such as CSS, JS, images, etc, are served directly by the webserver, not via calls to WordPress. So having a theme directory that is not directly accessible and serve-able by the webserver process ...


2

Is it possible to give drop-ins in their own subdirectory of wp-content instead? No, it is not possible without editing the core WordPress code.


2

Why do you need this? In wp-config you can set defines. They will be accesible everywhere without needing to use globals. Define something: define('MY_DEFINE_NAME', 'THE_VALUE');. Then in your templates you can show the value like this: echo MY_DEFINE_NAME; Or set the value to a variable: $var = MY_DEFINE_NAME;.


2

http://codex.wordpress.org/Function_Reference/register_theme_directory /** * Register a directory that contains themes. * * @since 2.9.0 * * @param string $directory Either the full filesystem path to a theme folder or a folder within WP_CONTENT_DIR * @return bool */ function register_theme_directory( $directory ) You should be able to call ...


2

So dynamically set WP_SITEURL, WP_HOME, i override the wp-config as define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] ); define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] ); but when i call home_url() it always return x.co.uk hostname home_url() does not make use of any WordPress constants. It uses a call to get_option( ...


1

Try changing your script to this since you're not actually running a cross-browser request: <script> (function($) { $(document).ready(function() { var refreshId = setInterval(function() { $('#content').fadeOut("fast").load('/new.php').fadeIn("fast"); $("#content .span9 article").unwrap(); }, 10000); }); })(jQuery); ...


1

WordPress loads jQuery in NoConflict mode. Do not use $. Use jQuery or one of the other solutions in the Codex, like this one: (function($) { // Inside of this function, $() will work as an alias for jQuery() // and other libraries also using $ will not be accessible under this shortcut })(jQuery); Nothing will work until you sort that out.


1

What I generally do Install WP in sub directory. Open permalink set required permalink. Open settings->general link Remove the sub directory name from 'Site Address (URL)' Cut the index.php and .htaccess files from sub directory and paste them to root change code in index.php as you did. Again access settings->permalink save the form Done. You dont need ...


1

Your config file shouldn't be public at all. It includes your database credentials in addition to the 8 SALTs WordPress. (The secret keys alone make it possible to brute force your log-in in a bout a week: http://codeseekah.com/2012/04/09/why-wordpress-authentication-unique-keys-and-salts-are-important/)


1

You will need to create an alias to your Dropbox folder so those files can be accessed on your server. This can be done in httpd.conf: Alias /dropbox /Users/seth/Dropbox Or you could make a direct alias to the real wp-content folder: Alias /wp-content /Users/seth/Dropbox/Xammp-Content/wordpress/wp-content/ Then set WP_CONTENT_URL in wp-config.php ...


1

(s)FTP into your site, or use a file manager provided by your host, and undo what you did. Then, if you were editing PHP with the built in editor as I suspect, don't ever do that again-- ever. It is like working on an airplane while it is in the air. Create a local copy of your site and work locally. Upload to the host when you know the code works. If you ...


1

It is indeed a security issue to have those left as the defaults, but it is not an extremely serious issue. To mitigate the problem of known default salts, WordPress intentionally recognizes when those values are left as "put your unique phrase here" and will not use that phrase as a key/salt. Instead, it generates random 64 character salts internally and ...


1

There is a section that should look like this: defined( 'ABSPATH' ) || define( 'ABSPATH', __DIR__ . '/' ); require_once( ABSPATH . 'wp-settings.php' ); add_filter() is available after that, you are probably using it too early.


1

For security issues, Hostgator requires more parameters - like port, etc. - in wp-config.php to connect to a remote - non-localhost - mysql server. Read http://support.hostgator.com/articles/cpanel/how-to-connect-to-the-mysql-database-remotely


1

First, rename the folder wp-content/plugins/wordpress-https to wp-content/plugins/wordpress-https-OFF so that WordPress can't find it to run it. Second, add the following lines to your wp-config.php file, replacing the domain name with your domain name: define( 'WP_SITEURL', 'http://example.com/' ); define( 'WP_HOME', 'http://example.com/' );


1

You can move the wp-config file one level up. You can also create a .htaccess file and upload it to your uploads folder with this code: <Files ~ ".*..*"> Order Allow,Deny Deny from all </Files> <FilesMatch ".(jpg|jpeg|jpe|gif|png)$"> Order Deny,Allow Allow from all </FilesMatch> Or install a plugin for security which also scans ...


1

update the fields in general settings in wp-admin. I think it will solve your issue. please make sure that you will not give any static path for any image


1

I would consider it somewhat safe since that's where your database connection information is also stored. One could easily ruin your website by deleting your whole database if they had access to that file. There are a couple of things you can do to increase security: Move the wp-config file one level outside the root. Wordpress knows to look for the file ...


1

My advice is to not do long running bulk-operations over a web-connection in the first place. PHP works just fine from the command line. Write your one-time script to do whatever it is that you need it to do. If you need access to WordPress functions in that process, then include the wp-load.php file at the top of the script. Then, go to a shell prompt on ...


1

In WordPress error reporting is primarily controlled by WP_DEBUG and other related constants in wp-config.php file. Typically they are completely independent of theme and plugins, although some (well coded) extensions adjust their behavior accordingly with debug settings.



Only top voted, non community-wiki answers of a minimum length are eligible