Questions tagged [wp-config]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
34 views

How can you optimize WordPress as a headless CMS?

Is define( 'SHORTINIT', true ); the only configuration that is helpful?
0
votes
0answers
27 views

Getting file errors in a Wordpress Multisite ADMIN

This is for a multisite that has 3 levels of organization: main site - regions (subsites) and locations (sub-subsites). So you would be able to visit and administrate these urls: domain.com --> main ...
0
votes
0answers
19 views

the temporary save folder is wrong

when i try to upload image or add plugin to my wordpress website i get this errer the temporary save folder is wrong i try to fix this by creating temp folder in wp-content and fixing wp-config....
0
votes
0answers
16 views

Force SSL using FORCE_SSL_ADMIN

I followed this advice from the official docs to force SSL: define('FORCE_SSL_ADMIN', true); if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; Wordpress runs ...
1
vote
1answer
20 views

Why edits to wp-config.php must come before “That's all” comment

Every time I read about making changes to wp-config.php, the advice given is to make changes before this line: /* That's all, stop editing! Happy publishing. */ Why? What is special about that ...
0
votes
0answers
19 views

Two installations same DB

I have two wordpress installations using the same DB All files and directories in wordpress B is symlinked from wordpress A except the wp-config.php which is a regular file. In nginx, I added the ...
1
vote
1answer
46 views

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

I have made wordpress pages on divi builder on m localhost and they were working fine without any problem but when i installed divi on my online website its giving me the error Fatal error: Allowed ...
0
votes
0answers
21 views

Domain not redirected correctly with Wordpress Multisite

My Wordpress multisite installation uses two sites: Site 1: www.myexample.com Site 2: blog.myexample.com In addition, I own a second domain myexample2.com, which I would like to redirect to the ...
0
votes
1answer
18 views

Disable globally “Crop thumbnail to exact dimensions (normally thumbnails are proportional)” with Multisite

I would like to disable the "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" function for all blogs in my WordPress Multisite setup. This function is available in Dashboard,...
0
votes
0answers
10 views

How do you move or rename the themes directory within wp-content?

I know it is possible to move wp-content, but is it also possible to move or rename the themes directory within it?
2
votes
2answers
47 views

Best practice differences in DB options and wp-config between live, staging and local WordPress environments?

I've been using staging sites for years. So I'm not asking about the necessary difference to setup a working staging site such as search replacing URLs, dev version control branches, changing table ...
2
votes
1answer
30 views

htaccess and wordpress config files are regularly over written

I have a WordPress site (v5.2.3), and every now and again (possibly monthly) the wp-config.php and .htaccess files are over written with bad information. This results in two problems - first the DB ...
0
votes
0answers
11 views

Git post-receive hook overwriting wp-config

I'm new to thi workflow, so excuse this if it's a dumb question. I set up a post-receive hook for my wordpress website. It's a great way to make deployments - although it overwrites the wp-config.php ...
0
votes
2answers
48 views

plugings request url is the old url

I have changed my WordPress site url in wp-config.php by adding this two lines: define( 'WP_HOME', 'http:// $new url' ); define( 'WP_SITEURL', 'http:// $new url' ); almost everything working fine, ...
0
votes
1answer
76 views

What is the purpose of WP_CONTENT_URL?

While trying to move the wp-content to new folder, there is constant called WP_CONTENT_URL. Why do we need this one? Does WP_CONTENT_DIR and WP_CONTENT_URL needs to be same? Bcoz there are several ...
0
votes
0answers
50 views

wp-config.php keeps being reset to default

A few months ago, I migrated a wordpress website from a Unix instance to a Windows Server running ISS. The migration was pretty rocky but it ended up working fine. About a week after the migration, I ...
0
votes
1answer
34 views

local wordpress multisite not working on AWS development server “error establishing database connection”

I have a composer WP starter installation on my local mac using mamp. It works as expected. I'm using phpdotenv to hide my wp-config.php settings and I have the wordpress directory moved into a sub-...
0
votes
0answers
19 views

Identifying DB_HOST location

The wp-config.php file lists DB_HOST as $_SERVER['DB_HOST'] -- how can I determine where $_SERVER['DB_HOST'] points? I must not be stumbling on the proper way to phrase this question, as I've ...
0
votes
1answer
25 views

Change of “home” results in timeouts (only on index.php)

So this question is probably a result of me not completely understanding the inner workings of Wordpress - especially the home variable. So here is what I did, and after that I will ask my question. ...
0
votes
2answers
57 views

FTP + Unable to locate WordPress content directory (wp-content)

When I try to upload a theme in my Wordpress website I need to fill in FTP credentials. I've installed vsftpd on my Ubuntu 18.04 server. When I connect with the credentials in my FTP client (ex. ...
2
votes
2answers
174 views

Safe to store SMTP password in wp-config.php?

I am using SMTP to send email through WordPress, however this requires using plain text password. What if this password is stored in wp-config.php? Very similar to this. Why this topic differs from ...
0
votes
1answer
82 views

Define option outside wp-config.php (on WordPress.com)

Using the PODS plugin. I need to add nested shortcode support which normally would be in the wp-config.php, but wordpress.com does not allow editing the core WordPress files. The change is: define('...
0
votes
0answers
21 views

wp-config.php randomly will reset to wp-config-sample.php

It seems every few months my wp-config.php is being overwritten to the wp-config-sample.php. Nothing else is corrupted or changed, just that. It started to do this early 2019. The host is Inmotion. I ...
1
vote
1answer
31 views

When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load

I recently set up my WordPress website and just noticed that if I click the home page from any other page, it points to the IP of my instance and the website won’t load. I have checked the URL(s) from ...
1
vote
2answers
21 views

WordPress - Promoting A Dev Build In A Subdirectory To Production / Root Directory

I recently took over a WordPress site with the following directory structure inside of /public_html: wp_config.php /wp-admin /wp-content /wp-includes ... ... ... /development The root (production) ...
0
votes
0answers
51 views

Doesn’t call user information to include “wp-load.php” in an external php file

Doesn't call user information to include "wp-load.php" in an external php file. <?php require_once( dirname( dirname( __ FILE __ ) ) . '/wp-load.php' ); global $wpdb, $user_ID; echo $user_ID; // ...
0
votes
0answers
15 views

editor option not available in dashboard

The editor option not showing up in the dashboard. I tried to set to false the statement define('DISALLOW_FILE_EDIT', true); But there is not any statement like this in wp-config file. What to do?
0
votes
0answers
9 views

Backend not loading after switching to public domain

I developed the website on a private VPN protected IP address. After I was done, I pointed a domain to a public IP that can be reached without a VPN which itself is pointed to the private IP. I then ...
0
votes
0answers
13 views

Use domain as siteurl on front end and IP as siteurl in back end

When I set the siteurl to the VPN protected private IP, the backend loads but the frontend doesn't and that is because they don't have access to the VPN to be allowed to load the IP. When I set the ...
0
votes
0answers
28 views

How to have differents sites share the same tables of DB?

I want to have multiple versions of my site that share the same database. I'm wondering if this is as simple as just cloning the site and then in the wp-config having them all use the same database? ...
0
votes
0answers
28 views

Saving settings fails with reverse SSL proxy

Whenever I save a setting in wp-admin, I get redirected to /af-wiki/af-wiki/wp-admin/options-general.php. Nonetheless, my alterations are stored properly. Saving pages, browsing, changing themes, .. ...
1
vote
1answer
318 views

Fix 403 error on WordPress multisite network using subdomains

I've a WordPress installation that I've transformed into a multisite network. I'm using cPanel and I've followed all the instructions to configure the WordPress installation. I've set up the ...
1
vote
1answer
57 views

WP install in sub-dir white screen

My WP moved from localhost to online, and now it shows a blank page (wp-admin is working normally). This is the structure: sub.domain.nl/dir1/dir2/WP-install Something must me off with the ...
0
votes
2answers
40 views

White screen of death on admin pages after moving wp-config up two levels for security

I moved the wp-config to the hosting root and put it in a new directory and then I included it from the WordPress directory like so: include("../../my-fast-cars/fast-cars.php"); this gave me white ...
1
vote
1answer
20 views

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

When the trash feature is enabled, the deleted posts are moved to trash and stored there for 30 days. And there is a schedule/wp_cron event that is responsible for removing these posts permanently ...
0
votes
0answers
232 views

WP_SITEURL vs WP_HOME link output

When WP_SITEURL and WP_HOME are set to different values - for example https://example.com/wordpress and https://example.com - the output links are inconsistent. Thus, a permalink output will be ...
0
votes
1answer
458 views

How to change WordPress theme outside of admin? Can't access dashboard

I have extracted my theme via File Manager but it somehow crashed. I activated the theme and now I can not access my admin at /my-web/wp-admin/. Is there another way to change my theme since I cannot ...
0
votes
1answer
44 views

What can an attacker do if he has access to my wp-config file?

Can he do anything besides read database connection which is localhost and not accessible via remote host ?
0
votes
1answer
29 views

where should I write constants in wordpress?

I have to define a constants to use all over the entire project(i.e: single.php, category.php, my-template.php). Suppose I define a array constant to declare a list of browser name. i.e: array('...
0
votes
1answer
58 views

Disable theme WooCommerce template [closed]

Just purchased a premium WooCommerce-read theme. Unfortunately, this theme comes with a /woocommerce folder. How can I disable this templates,without deleting whole folder?
0
votes
1answer
463 views

How to fix wp-login.php gives error 500 after migration?

I have migrated a word press site to a self hosted linux server. My front page and all other pages load however images are still pointing to my old server. My wp-login.php page also gives an error 500....
0
votes
1answer
1k views

how to encyrpt DB_PASSWORD in wp-config

Recently moved my wordpress site to another hosting provider and after importing my database I had issues establishing a database connection. I edited wp-config file and entered my DB_PASSWORD to re-...
0
votes
2answers
55 views

How to configure Wordpress Database for CentOS 7

I'm trying move an existing Wordpress site to run across two different servers, one with Apache and the main source code and the other that just has the database running on MYSQL. wp-config: define('...
0
votes
0answers
24 views

remove wp- prefix using a php script [duplicate]

I want to remove the wp- prefix from the wp-admin folder. I don't want to use a plugin, this because I want to code myself this wordpress hack. My question is, what files I need to edit after I've ...
0
votes
1answer
2k views

How can I change preview URL?

How can I change the preview URL in Wordpress? When creating a post in Wordpress, there is a Preview button which takes you to the draft view. Because I have a custom integration of Wordpress and don'...
0
votes
1answer
177 views

Site lost all formatting when I attempted to migrate to Bluehost [closed]

I think I really screwed something up here...I would love some help fixing the problem, or at least some help figuring out what is going on So, I used wordpress.org CMS to create a site locally using ...
1
vote
1answer
300 views

error log cluttered with undefined DB_USER wp-admin/setup-config.php

I have an up and running WordPress site for some time. Lately, I noticed somebody or something is making requests to www.example.com/wp-admin/setup-config.php?step=0. Which is resulting in these ...
0
votes
2answers
245 views

Wordpress failing to update plugins

After cloning my wordpress site and fresh install of it i encountered problem. Plugins won't update. I'm working in Linux environment (Ubuntu). I've tried multiple solutions but still without positive ...
0
votes
1answer
567 views

Moving wp-config.php one level up - 500 error - Nginx [closed]

My wordpress installation is at /var/www/html/ I have moved the wp-config.php file one level up to /var/www/ and deleted the original file. However, I am getting a 500 error. Within the wp-config....
0
votes
2answers
546 views

How can I resolve the php notice “Constant EMPTY_TRASH_DAYS already defined”

With define('WP_DEBUG', true); in wp-config.php, I get the following notice: Constant EMPTY_TRASH_DAYS already defined in /wp-config.php on line 83 I have checked this file, and this constant is ...