Forum Replies Created

Viewing 15 replies - 346 through 360 (of 706 total)
  • https://github.com/WordPress/WordPress/blob/5.3-branch/wp-includes/default-constants.php#L407
    You must always have at least a twenty * default theme that refers to your installation, even if you remove a theme in use on one or more secondary sites the default theme will be used but in the database you have the old path of the previous theme. Unfortunately at the moment you can manage this manually. note * even if you delete themes (except defaults) or plugins from the administrative area, you do not have the certainty that the data previously entered in the database will be deleted.
    The constant on the link shown can also be inserted into your wp-config.php

    https://wordpress.org/support/article/creating-database-for-wordpress/ with HOST: field Local otherwise mysql or mariaDB considers as external/remote (not work for security).
    CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'user_password';
    This localhost never % (Any Host).
    after creating the user for that wordpress database, at the first installation it creates the content inside your database or otherwise you have to export your ftp (and wp-config.php with value for new database) and sql files and import the files on the new server and sql on the new database.

    Using the MySQL Client #Using the MySQL Client
    You can create MySQL users and databases quickly and easily by running mysql from the shell. The syntax is shown below and the dollar sign is the command prompt:

    $ mysql -u adminusername -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5340 to server version: 3.23.54
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql> CREATE DATABASE databasename;
    Query OK, 1 row affected (0.00 sec)
    
    mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname"
    -> IDENTIFIED BY "password";
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.01 sec) 
    
    mysql> EXIT
    Bye
    $ 

    127.0.0.1 means localhost, your webserver or an external ip attack. Do you use Apache with some module for load balancing or reverse proxy? If I have not used it it should be REMOTE_ADDRESS in the APACHE log.
    Example mod_rpfa,mod_cloudflare, mod_remoteip etc.

    Forum: Fixing WordPress
    In reply to: URL and subfolders

    sorry I wrote a wrong code, as per wordoress manual do a redirect based on whether your domain is identified if it is a different path that is not files and no directories redirect with all the content otherwise redirect to your index folder. php. In this scenario you must also include a redirect to the default domain if it does not match any rules.

    # for domain1 and domain2
    # for root
    #Fix wordpress
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^(www.)?domain1.example.com$ [NC]
    RewriteCond %{REQUEST_URI} !^/my_subdir1/ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /my_subdir1/$1 [L]
    RewriteCond %{HTTP_HOST} ^(www.)?domain1.example.com$ [NC]
    RewriteRule ^(/)?$ my_subdir1/index.php [L]
    RewriteCond %{HTTP_HOST} ^(www.)?domain2.example.com$ [NC]
    RewriteCond %{REQUEST_URI} !^/my_subdir2/ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /my_subdir2/$1 [L]
    RewriteCond %{HTTP_HOST} ^(www.)?domain2.example.com$ [NC]
    RewriteRule ^(/)?$ my_subdir2/index.php [L]
    #Default Domain
    RewriteCond %{HTTP_HOST} !^(www.)?domain1.example.com$ [NC]
    RwwriteCond %{HTTP_HOST} !^(www.)?domain2.example.com$ [NC]
    RewriteRule ^(/)?$ http://domain1.example.com/my_subdir1/index.php [R,L]
    </IfModule>

    PT

    they are right I checked your api rest and it works with mod_rewrite, wordpress checks if it is https via port 443 or if set to 1 https,
    You can create test.php

    <?php
    echo $_SERRVER['SERVER_PORT'];

    Add this constant into wp-config.php before ABSPATH

    //Without end slash
    define('WP_HOME','https://your site.com');
    define('WP_SITEURL','https://your site.com');

    This constant will use this regardless of the value of the database

    Forum: Fixing WordPress
    In reply to: URL and subfolders

    WordPress does not create this htaccess, however if you have to use two wordpress installations with different folders you have to combine the rule. If this rule is created by a plugin or theme, make sure you ask them for support or you will have to set it manually each time you update.

    Correct for multiple domain name

    # for domain1 and domain2
    # for root
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} domain(1|2).com [NC]
    RewriteCond %{REQUEST_URI} !^/(domain1) [NC,OR]
    RewriteCond %{REQUEST_URI} !^/(domain2) [NC]
    RewriteRule ^/?(domain(1|2))?(.*)$ /%2/$3 [L]

    Internal redirect.
    $1 your script is domain1 o domain2
    /domain1/domain1
    My script if folder not domain1 and not domain2 default is folders domain2, RewriteRule work with start domain1 or domain2 else all value.

    Installation Instructions
    Download and install using the built in WordPress plugin installer.
    Activate in the “Plugins” network admin panel using the “Network Activate” link.
    Comment out the DOMAIN_CURRENT_SITE line in your wp-config.php file. If you don’t have this line, you probably need to enable multisite.
    Start planning and creating your networks.

    What about multisite constants?
    For maximum flexibility, use something like…

    // Multisite
    define( 'MULTISITE',           true                  );
    define( 'SUBDOMAIN_INSTALL',   false                 );
    define( 'PATH_CURRENT_SITE',   '/'                   );
    define( 'DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST'] );
    
    // Likely not needed anymore (your config may vary)
    //define( 'SITE_ID_CURRENT_SITE', 1 );
    //define( 'BLOG_ID_CURRENT_SITE', 1 );
    
    // Uncomment and change to a URL to funnel no-site-found requests to
    //define( 'NOBLOGREDIRECT', '/404/' );
    
    /**
     * These are purposely set for maximum compliance with multisite and
     * multinetwork. Your config may vary.
     */
    define( 'WP_HOME',    'http://' . $_SERVER['HTTP_HOST'] );
    define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );

    What about cookies?
    Use something like this to allow cookies to work across networks…

    // Cookies
    define( 'COOKIEHASH',         md5( 'yourrootdomain.com' ) );
    define( 'COOKIE_DOMAIN',      'yourrootdomain.com'        );
    define( 'ADMIN_COOKIE_PATH',  '/' );
    define( 'COOKIEPATH',         '/' );
    define( 'SITECOOKIEPATH',     '/' );
    define( 'TEST_COOKIE',        'thing_test_cookie' );
    define( 'AUTH_COOKIE',        'thing_'          . COOKIEHASH );
    define( 'USER_COOKIE',        'thing_user_'     . COOKIEHASH );
    define( 'PASS_COOKIE',        'thing_pass_'     . COOKIEHASH );
    define( 'SECURE_AUTH_COOKIE', 'thing_sec_'      . COOKIEHASH );
    define( 'LOGGED_IN_COOKIE',   'thing_logged_in' . COOKIEHASH );

    Uploads?
    As of version 3.5, new WordPress multisite installs use a more efficient way to serve uploaded files.
    Unfortunately, this doesn’t play well with multiple networks (yet). Installs that upgraded from 3.4 or below are not affected.

    WP Multi-Network needs to be running to help set the upload path for new sites, so all networks created with this plugin will have it network activated.
    If you disable it on one of your networks, any new site you create on that network will store its uploaded files under that network’s main site’s uploads folder. It’s not pretty.

    Just leave this plugin network-activated (or in mu-plugins) and it will take care of everything.

    Can I achieve a multi-level URL path structure domain/network/site with subfolder network?
    To achieve nested folder paths in this fashion network1/site1, network1/site2 etc,
    please follow the steps in https://paulund.co.uk/wordpress-multisite-nested-paths to construct a custom sunrise.php (Thanks to https://paulund.co.uk for providing these steps).

    Be sure to make backups of your files and database before installing and configuring this plugin. I don’t stop to comment on the code I pasted but you need to know that if WordPress has to access each site the content of the wp-confing file must be dynamic, in this case this / indicates the root $_SERVER[‘HTTP_HOST’] can be origins of attack problems (so create a white list of allowed domains, for example domain1.com and domain2.com) if the multisite installation is a subdirectory you must set the root / to your subdirectory /subdirectory/ so that the cookie is available from that subdirectory, from wordpress 4.5 there is the domain mapping for secondary sites, I’m not sure if you have to use sunrise.php or not, so ask support at their forum ..

    https://wordpress.org/support/plugin/wp-multi-network/
    http://mutinetworknormal.com
    http://multinetworknormal.com/user1
    http://multinetworknormal.com/user2
    other network
    http://multinetworknormal.com/ntw2
    http://multinetworknormal.com/ntw2/user1
    http://multinetworknormal.com/ntw2/user2
    Etc.
    Without end slash for create network or subsite.

    • This reply was modified 6 years, 6 months ago by autotutorial.
    • This reply was modified 6 years, 6 months ago by Jan Dembowski.

    It’s a commercial plugin you can get better support from the creator of the plugin. error control operator @ temporarily lowers the error_repornting level to 0 (no error), creates a copy of this plugin and checks every @ in the source code.
    https://wpml.org/home/minimum-requirements/ 128MB for single WPML plugin.
    Read https://wpml.org/forums/topic/fatal-error-allowed-memory-size-of-268435456-bytes-exhausted-8/ for this debug.

    Forum: Fixing WordPress
    In reply to: REST API Help!
    Forum: Fixing WordPress
    In reply to: REST API Help!

    There are several reasons why a status code other than http 200 is received, a special case is for http 404 in wordpress for the API REST results in checking more than once with the possible variants.
    Pretty Permalink
    (mod_rewrite)
    http://yourdomain.com/wp-json/ (Pathinfo) http://yourdomain.com/index.php/wp-json/
    Ugly (without mod_rewrite with query string)
    http://yourdomain.com/?rest_route=/ Currently you are using the Ugly method but the plugin expects the Pretty Permalink method. Copy past this message to their support.

    .htaccess not work for nginx

    server {
        listen 80;
        listen [::]:80;
        server_name linuxize.com www.linuxize.com;
        return 301 https://linuxize.com$request_uri;
    }

    https://linuxize.com/post/redirect-http-to-https-in-nginx/
    Wordpress guide for https, W3 total cache and other https://wordpress.org/support/article/nginx/

    it is an error on the php code of the plugin used for payment, you have to forward this request to the plugin developer. If the developer does not know this flaw, have him read this discussion.
    https://github.com/craftcms/commerce/issues/309

Viewing 15 replies - 346 through 360 (of 706 total)