Skip to main content
Share Your Experience: Take the 2024 Developer Survey
37 votes

What security concerns should I have when setting FS_METHOD to "direct" in wp-config?

What's the risk? On a poorly configured shared host, every customer's PHP will execute as the same user (let's say apache for discussion). This setup is surprisingly common. If you're on such a ...
Mark's user avatar
  • 471
37 votes
Accepted

Cookies in Multisite network where sites have their own domain name?

First clear your browser's cache (including cookies), and your server's cache (e.g. cache plugins). Then set the following in your wp-config.php file: define('ADMIN_COOKIE_PATH', '/'); define('...
Scott's user avatar
  • 1,315
32 votes

Site Redirecting to wp-signup.php

For me it was changing old domain entries in database tables wp_blogs and wp_site to the new domain of the multisite's main domain. I haven't done this after the migration to a new domain.
André Kelling's user avatar
23 votes

Is it possible to change the log file location for WP_DEBUG_LOG?

It seems most of the answers here are not true anymore for WP version 5.1 and above since this change: https://make.wordpress.org/core/2019/01/23/miscellaneous-developer-focused-changes-in-5-1/ You ...
Carl Alberto's user avatar
  • 1,077
19 votes

Should I disable WP_CRON and trigger wp-cron.php from the server?

There is no downside for running WP CRON using the server's cron jobs. In fact this is the recommended practice. According to Official WordPress Plugin Development Document: WP-Cron does not run ...
Fayaz's user avatar
  • 8,917
16 votes

What's the difference between WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT?

WordPress tells us: the WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message ...
DaveLak's user avatar
  • 1,037
15 votes

Disable SSL / HTTPS for wordpress

Check your wp-config.php file for lines like: define( 'WP_SITEURL', 'https://example.com' ); define( 'WP_HOME', 'https://example.com' ); Also check your database's {prefix}_options table: SELECT ...
Pat J's user avatar
  • 11.9k
15 votes
Accepted

Please explain how Wordpress works with MySQL character set and collation at a low level

There are two defines in wp-config.php of WordPress website: define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); There are several things which are most commonly misunderstood. Names of ...
Frank P. Walentynowicz's user avatar
14 votes

Which one does Wordpress prioritize when it comes to php.ini, wp-config and .htaccess?

It's not clear from your question what you are changing in each of these files, but I presume in each case it is the upload_max_filesize PHP setting. In general, settings will be applied in this ...
IMSoP's user avatar
  • 241
11 votes

How to use live images on local install?

The best way to do it is to use URL Rewrites. This way you'll not have to do any change before uploading CODE to your server back again. Custom rules for localhost: Try the following CODE in your ....
Scott's user avatar
  • 1,315
10 votes

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes)

Add the following at the top of wp-config.php: ini_set('memory_limit','128M'); Although you should use WP_MEMORY_LIMIT when you can, we see in /wp-includes/default-constants.php that Wordpress doesn'...
Design.Garden's user avatar
9 votes

Cookies in Multisite network where sites have their own domain name?

Using WordPress version 4.9.4. I was getting the cookie error and looked through various help options and eventually solved it by using a parts of Scott's fix. (Note: I didn't do any cookie cache ...
user140609's user avatar
9 votes
Accepted

If I change the salt keys in my wp-config will all passwords break?

No the passwords won't break (those are in the database and aren't changed by changing the salt). However all logged-in users will have to login again. More on Salts here. Note: Updating your ...
Nathaniel Flick's user avatar
9 votes
Accepted

How can I change preview URL?

You can do something like this, add to functions.php add_filter( 'preview_post_link', 'the_preview_fix' ); function the_preview_fix() { $slug = basename(get_permalink()); return "http://www....
RiddleMeThis's user avatar
  • 3,767
8 votes

COOKIE_DOMAIN setting confusion

I have been struggling with using the multisite domains of native 4.x wordpress. Despite finding references, saying these lines corrected the error, neither of these setting worked: //define('...
Wayne Brian Pearsall's user avatar
8 votes
Accepted

WP_MEMORY_LIMIT didn't work in wp-config

Need to set both the constants before ABSPATH is defined. Right after this line in wp-config.php define( 'WP_DEBUG_LOG', true );
Piyush Rawat's user avatar
7 votes

Notice: Constant WP_POST_REVISIONS already defined

I have the same problem before. I put WP_POST_REVISIONS in the end of wp-config.php file and it didn't work correctly. You should put your codes before defining ABSPATH and before this line: /* ...
Mehdi Soltani's user avatar
7 votes

Disable SSL / HTTPS for wordpress

You can modify .htaccess file: RewriteEngine On RewriteCond %{HTTPS} on RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
user113337's user avatar
7 votes

What's the difference between WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT?

The WP_MEMORY_LIMIT is the default limit set in the front-end, but it can be raised up to WP_MAX_MEMORY_LIMIT in wp-admin pages, as well as certain other functions such as image manipulation. In ...
joetek's user avatar
  • 323
6 votes

Is it possible to change the log file location for WP_DEBUG_LOG?

Times change, and so do correct answers to technical questions. The current answer as of late 2019 is simple. When defining the WP_DEBUG_LOG "constant" in wp-config.php, you can now provide a path ...
Michael Teter's user avatar
6 votes

Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?

I can't comment so I'm leaving this answer. As a follow up to the fantastic research done by @Borislav there is another SE thread that is related, with several potential fixes: Site Redirecting to wp-...
Jesse Nickles's user avatar
5 votes
Accepted

How does the "authentication unique keys and salts" feature work?

Basically, they're hashing salts. They're used to make the results of hashing much less predictable. See https://en.wikipedia.org/wiki/Salt_(cryptography) for info on salts. AUTH is used for the /wp-...
Otto's user avatar
  • 32.6k
5 votes

Which one does Wordpress prioritize when it comes to php.ini, wp-config and .htaccess?

Basically all three files are taken into consideration. WordPress/your server will check in the following order: wp-config.php > .htaccess > php.ini If something on a "higher level" (later in ...
flomei's user avatar
  • 1,054
5 votes
Accepted

Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?

After many hours of debugging and despair, the problem is now solved. It turned out to be a very obscure thing. The redirect is issued by the function ms_load_current_site_and_network() inside /wp-...
Borislav Zlatanov's user avatar
4 votes

WP-Admin not working properly at Wordpress multisite with subdirectories

If you installed WordPress Multisite starting with version 3.0 to 3.4.2, you've got the correct .htaccess file contents. However, if you started with a newer version (3.5 or higher)—and I'm assuming ...
Pat J's user avatar
  • 11.9k
4 votes

Cookies in Multisite network where sites have their own domain name?

Finally after hours, literally, of troubleshooting I was able to get this resolved on the AWS Lightsail Bitnami Multisite Wordpress (WordPress 5.0.4) instance by performing the following: Ensure the ...
George Drew's user avatar
4 votes
Accepted

Syntax of FS_CHMOD_DIR and FS_CHMOD_FILE

The basic syntax for define() is: define ( $name, $value ) In the above definition, the value is: ( 0755 & ~ umask() ) The '&' (ampersand) is the 'And' bitwise operator, the '~' (tilde) is ...
Nathan's user avatar
  • 56
4 votes
Accepted

How can I resolve the php notice "Constant EMPTY_TRASH_DAYS already defined"

When defining any WordPress constants in wp-config.php you need to do it before this line: require_once( ABSPATH . 'wp-settings.php' ); That line loads many of WordPress’s default constants, and if ...
Jacob Peattie's user avatar
4 votes
Accepted

How to change how long items are kept in the trash?

You can change that in wp-config (https://codex.wordpress.org/Editing_wp-config.php#Empty_Trash): define( 'EMPTY_TRASH_DAYS', 1 ); // Integer is the amount of days
mrben522's user avatar
  • 1,673
4 votes

What conditions must be met in order to upload .zip file to a multisite Wordpress installation?

The issue has nothing to do with the source code of a theme or plugin or with the configuration of Wordpress. It is: a 6+ months old bug in File block in Gutenberg that narrows down to a 4+ years old ...
trejder's user avatar
  • 322

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