Hot answers tagged

3

You should not put any defines in the end of the wp_config.php it is actually explicitly stated in it ;) Every define you add should be above the line saying /* That's all, stop editing! Happy blogging. */ Anything after that will have impact only after wordpress had finished to process the request


2

The procedure is thorooughly documented in Codex under Moving a Root install to its own directory. You misunderstand the point about changing URLs in it, and yes terminology sucks. They only URLs that will change are those that are based of "WP address". That would be WordPress core, essentially admin part. All content URLs are based of "Site address", ...


2

This error is generated in wp-login.php , it happens if server is unable to set cookies, this can happen due to several reasons, one of the common issue is: output being sent before setting up of cookies. Try out following options: Update WordPress core, if it is not up to date change theme, if you are using custom theme, just ftp into server and delete ...


2

You can try the wp_revisions_to_keep filter to override the value of the WP_POST_REVISIONS constant: /** * Turn off revisions */ add_filter( 'wp_revisions_to_keep', function( $num, $post ) { //--------------------------------- // Adjust the $num to your needs //--------------------------------- if ( post_type_supports( $post->post_type, ...


2

As cdn.mydomain.com is not part of your WordPress network, it wont be affected by your settings. The COOKIE_DOMAIN constant should only be used if you want to serve cookies from a single domain for all your sites in the network. If you omit the constant or set it to an empty value, cookies will belong to the domain their requested from. Thats the ...


2

The enfoce_gzip constant, and the other in the same group in your config, actually refer to how wordpress should serve admin side related JS and CSS, and it seems like you are interested in the front end. Setting gzip compression is something that you should do in your server configuration level (several options depending on the server, but for apache you ...


2

It looks like you have not imported the backup of database (sql file) to new database you have created in your localhost. Also after importing the database to local server you will need to replace the live site URL with new localhost URL at all instances in local database.


2

After more fruitless searching, I stumbled across this article from WP Tavern which mentioned a plugin then called "WP Local Dev Environment," now called Airplane Mode. The plugin blocks a long list of things that WordPress does which require checking something from the Internet. While it is intended to be toggled on or off depending on whether you have a ...


1

Technically, they are for only one purpose: override memory_limit value in php.ini. The difference is: WP_MEMORY_LIMIT will permanently override memory_limit if its value is greater than the current value in php.ini. WP_MAX_MEMORY_LIMIT will temporarily override memory_limit with whatever value you defined. And it only happens in some events such as ...


1

When you copy the files from goDaddy all sorts of oddities from that host may come with it. If I were you I would do a clean install. Download WordPress and install it Check which plugins and themes you have running on your goDaddy. Download fresh ones and install them. Export all content from goDaddy (under tools -> export) and upload it locally. Copy the ...


1

There is actually nothing unique about setting multisite on XAMPP, all you need to do is properly configure the webserver as a proper webserver, and skip the lazy practice of using localhost as your site domain. Select some random domain you are not likely to use in your web use, edit your hosts file to point that domain to 127.0.0.1, and set the vhost in ...


1

wp-config.php file do not have to be at the root directory, it can also be at the directory above it (that way they are not easily accessible from the web even if php interpreter malfunctions).


1

Here a - quick and dirty way - to get 'live to local' with wamp. Assuming that you access your live site as in http://yoursite.com Steps to take: Copy your live site as you did, public_html to www Edit wp-config.php and add folowing 2 lines code: define( 'WP_SITEURL', 'http://local.yoursite.com' ); define( 'WP_HOME', 'http://local.yoursite.com' ); IF ...


1

Yes. If you use the generator to create the salts then add them to your wp-config.php file you can start reaping the benefits of much greater security. Any current sessions will be invalidated so you'll have to log back in but otherwise there shouldn't be any noticeable change. Automatic generation of random salts was added a few years back so any new ...


1

Instead of renaming, set up your local web server to handle requests to that domain and modify your local hosts file to associate the domain with ip 127.0.0.1. Especially when debugging hard to find bugs you will want your enviroment to be as similar to the one of the live site. (I can do it in a not very modern version of WAMP and therefor I assume you ...


1

Step 1: Check the error logs, to view which file(s) is causing error.Checking your error log file will help you understand what is exactly causing the issue. Error Logs Step 2: If the errors are like “Cannot modify header information – headers already sent by (output started at” and then file path and wp-login.php file’s path and line number.This will ...


1

First check your site with a default WordPress theme and if your issue is resolved, so try to check your theme php files and remove any space or new line before <?php and remove ?> at the end of files. Also check https://codex.wordpress.org/Editing_wp-config.php#Set_Cookie_Domain and use define( 'COOKIE_DOMAIN', 'www.askapache.com' ); in your wp-...


1

Upon further investigation, I found that the answer to my problem involved one simple, yet easy to overlook fix: I needed to add this new site to my hosts file.


1

You need to create wp-config.php file. This new file is copy of wp-config-sample.php find it in root directory. After creating this copy name it wp-config.php and set up database setting into it. Also give access permission to it. Let me know if above wording is not used to for you.


1

Create a new file names wp-config.php and paste all the code than enter your db credentials it will solve your wp-config issue. <?php /** * The base configurations of the WordPress. * * This file has the following configurations: MySQL settings, Table Prefix, * Secret Keys, WordPress Language, and ABSPATH. You can find more information * by visiting ...


1

The problem turned out to be that wp-config was infected with some sort of code. Typical of what you see at the top of infected .php files. I have cxs running on the server and it was, quite rightly, detecting the malicious (I assume) code and quarantining the file. When I restored the file, because I didn't look at the content, I was restoring an ...


1

Here is my take: RewriteRule (?:readme|license|changelog|-config|-sample)\.(?:php|md|txt|html?) - [R=404,NC,L] 404 (not existing) rather than 403 (forbidden) to avoid any clue about existence. also in subfolders (i.e. themes and plugins, which might offer attack opportunities) case-insensitive, extension-flexible, also catches README.html, or license....



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